51typedef enum : uint16_t {
304 bool already_truncated);
427 bool already_truncated);
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_TEST_HELPER
Mark a symbol as externally-linked but only callable from tests.
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).
Read-only on-device volume consistency check (fsck) for ra8_fs.
ra8_fs_check_fault_kind_t
The category of a single consistency finding.
void ra8_fs_check_test_exfat_push_overflow(ra8_fs_check_ctx_t *ctx, uint32_t cluster, bool already_truncated)
Exercise the exFAT directory-worklist overflow guard from a host test.
void priv_check_zero_bitmap(ra8_fs_check_ctx_t *ctx)
Zero the scratch visited-bitmap over its valid bit range.
ra8_err_t ra8_fs_check_test_exfat_mark_dir_alloc(ra8_fs_check_ctx_t *ctx, uint32_t first)
Exercise the exFAT FAT-chained directory allocation marker from a host test.
void ra8_fs_check_test_fat_push_overflow(ra8_fs_check_ctx_t *ctx, uint32_t cluster, bool already_truncated)
Exercise the FAT directory-worklist overflow guard from a host test.
void ra8_fs_check_test_exfat_mark_run(ra8_fs_check_ctx_t *ctx, uint32_t first, uint64_t nclus)
Exercise the exFAT contiguous-run marker from a host unit test.
bool priv_check_in_range(const ra8_fs_check_ctx_t *ctx, uint32_t cluster)
True when cluster is a real data cluster of the volume under check.
ra8_err_t priv_check_fat(ra8_fs_check_ctx_t *ctx)
Run the FAT12/16/32 consistency check into the context's report.
ra8_fs_check_bound_t
Static bounds that keep a scan of a corrupt volume terminating.
@ k_ra8_fs_check_max_dirs
Directory worklist depth cap.
bool priv_check_mark(ra8_fs_check_ctx_t *ctx, uint32_t cluster)
Mark cluster visited in the scratch bitmap; report a prior visit.
ra8_err_t priv_check_exfat(ra8_fs_check_ctx_t *ctx)
Run the exFAT consistency check into the context's report.
ra8_err_t ra8_fs_check_test_fat_scan_cluster_dir(ra8_fs_check_ctx_t *ctx, uint32_t first)
Exercise the FAT cluster-directory walker from a host unit test.
ra8_err_t ra8_fs_check_test_exfat_mark_fatchain(ra8_fs_check_ctx_t *ctx, uint32_t first)
Exercise the exFAT fragmented-chain walker from a host unit test.
bool priv_check_visit(ra8_fs_check_ctx_t *ctx, uint32_t cluster, ra8_fs_check_fault_kind_t oor_kind)
Visit a cluster during a walk: mark it, and report a range or link fault.
void priv_check_fault(ra8_fs_check_ctx_t *ctx, ra8_fs_check_fault_kind_t kind, uint32_t cluster, uint64_t lba, uint32_t entry_off)
Record one consistency finding into the report.
The state one ra8_fs_check run threads through its passes.
ra8_fs_check_report_t * rep
The report being filled.
uint32_t bitmap_bits
Valid bit count (== clusters_total).
ra8_fs_mount_t * m
The mounted volume under check.
uint8_t * bitmap
Scratch visited-cluster bitmap, or NULL.
The structured result of one ra8_fs_check run.
Cached parse of one mounted FAT volume.