72 const uint8_t label_type =
130 for (uint32_t i = 0U; i < n; i++) {
131 if ((w + 1U) >= out_len) {
145 bool present =
false;
163 bool present =
false;
171 if (label !=
nullptr) {
173 if (label[n] ==
'\0') {
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_not_found
Requested item not found (lookup / search missed).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Minimal FAT12/FAT16/FAT32 filesystem adapter (read + write).
void priv_byte_copy(uint8_t *dst, const uint8_t *src, uint32_t n)
Length-checked byte copy used in place of memcpy().
void priv_exfat_dir_root(const ra8_fs_mount_t *m, exfat_dir_t *out)
Fill out with the volume root's directory location.
void priv_exfat_cursor_init(const exfat_dir_t *dir, exfat_cursor_t *out)
Aim a fresh cursor at the start of dir.
ra8_err_t priv_exfat_get_label(const ra8_fs_mount_t *m, char *out, uint32_t out_len)
Read an exFAT volume's label into an ASCII buffer.
ra8_err_t priv_exfat_set_label(const ra8_fs_mount_t *m, const char *label)
Set (or clear) an exFAT volume's label in place.
static void internal_exfat_label_decode(const uint8_t *entry, char *out, uint32_t out_len)
Decode an exFAT Volume Label entry's UTF-16LE label into ASCII.
static ra8_err_t internal_exfat_locate_label(const ra8_fs_mount_t *m, exfat_setpos_t *out_pos, uint8_t *out_entry, bool *out_present)
Locate the exFAT Volume Label entry (or the slot to create one at).
ra8_err_t priv_exfat_next_entry(const ra8_fs_mount_t *m, exfat_cursor_t *cur, uint8_t *out)
Fetch the next 32-byte directory entry, following the cluster chain.
ra8_err_t priv_exfat_write_dir_set(const ra8_fs_mount_t *m, uint32_t cluster, uint32_t idx, const uint8_t *set, uint32_t bytes)
Write a pre-built entry set into consecutive directory entries.
Cross-TU shared declarations for the FAT/exFAT ra8_fs adapter.
@ k_exfat_entry_label
Volume Label directory entry.
@ k_exfat_fmt_label_max
Volume-label cap (UTF-16 units).
@ k_exfat_entry_bytes
Directory entry size.
@ k_exfat_entry_eod
End-of-directory marker.
@ k_exfat_scan_limit
Max dir entries scanned (P10 bound).
@ k_exfat_inuse_bit
Directory entry type bit 7 = in use.
@ k_exfat_de_lbl_name
Volume-label entry: UTF-16 label.
@ k_exfat_de_lbl_cnt
Volume-label entry: CharacterCount.
Linear cursor over a directory's 32-byte entries.
uint32_t scanned
Total entries read (P10 bound).
uint32_t cluster
Current directory cluster.
uint32_t entry_in_cluster
Next entry index within the cluster.
Identifies the exFAT directory a lookup, scan or link operates in.
Directory position (cluster + entry index) of one 32-byte entry.
uint32_t index
Entry index within that cluster (0-based).
uint32_t cluster
Directory cluster holding the entry.
Cached parse of one mounted FAT volume.