ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_fs_check_report_t Struct Reference

The structured result of one ra8_fs_check run. More...

#include <ra8_fs_check.h>

Collaboration diagram for ra8_fs_check_report_t:

Data Fields

ra8_fs_type_t type
 The volume variant that was checked.
bool referenced_scan
 true when a bitmap enabled the reference analysis.
uint32_t clusters_total
 Data-region cluster count.
uint32_t clusters_free
 Clusters that read as free.
uint32_t clusters_used
 Clusters that read as allocated.
uint32_t clusters_bad
 FAT defective-marker clusters (informational).
uint32_t clusters_lost
 Allocated but referenced by nothing; k_ra8_fs_check_unknown when ::referenced_scan is false.
uint32_t chains_crosslinked
 Clusters reached by more than one chain.
uint32_t bitmap_mismatches
 exFAT clusters referenced with the bitmap bit clear.
uint32_t entries_bad
 Bad dir entry / SetChecksum / NameHash findings.
uint32_t dirs_visited
 Directories walked.
uint32_t files_visited
 Files walked.
uint32_t faults_total
 Every finding, across all categories (0 == clean).
ra8_fs_check_fault_t first_fault
 Kind + location of the first finding.

Detailed Description

The structured result of one ra8_fs_check run.

Counts plus the first fault. ::faults_total is the primary verdict – zero means the scan found nothing – and the per-category counts (and ::first_fault) explain a non-zero total. The reference-dependent fields (::clusters_lost, ::chains_crosslinked, ::bitmap_mismatches, ::entries_bad, ::dirs_visited, ::files_visited) are only populated when ::referenced_scan is true; without a bitmap ::clusters_lost reads k_ra8_fs_check_unknown and the rest stay zero.

Invariant
referenced_scan == false implies clusters_lost == k_ra8_fs_check_unknown.
faults_total == 0 implies first_fault.kind == k_ra8_fs_check_fault_none.
Example:
static uint8_t s_bmp[(k_clusters + 7) / 8];
if (ra8_fs_check(mnt, s_bmp, sizeof(s_bmp), &rep) == k_ra8_ok &&
rep.faults_total == 0U) {
// volume is self-consistent; safe to write
}
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Definition ra8_err.h:119
ra8_err_t ra8_fs_check(ra8_fs_mount_t *handle, uint8_t *bitmap, uint32_t bitmap_bytes, ra8_fs_check_report_t *report)
Scan a mounted volume for consistency, read-only, and report findings.
The structured result of one ra8_fs_check run.
See also
ra8_fs_check()
Since
0.1.0

Definition at line 171 of file ra8_fs_check.h.

Field Documentation

◆ bitmap_mismatches

uint32_t ra8_fs_check_report_t::bitmap_mismatches

exFAT clusters referenced with the bitmap bit clear.

Definition at line 181 of file ra8_fs_check.h.

Referenced by internal_exchk_diff_byte().

◆ chains_crosslinked

uint32_t ra8_fs_check_report_t::chains_crosslinked

Clusters reached by more than one chain.

Definition at line 180 of file ra8_fs_check.h.

Referenced by priv_check_visit().

◆ clusters_bad

uint32_t ra8_fs_check_report_t::clusters_bad

FAT defective-marker clusters (informational).

Definition at line 177 of file ra8_fs_check.h.

Referenced by internal_fat_classify_one().

◆ clusters_free

uint32_t ra8_fs_check_report_t::clusters_free

Clusters that read as free.

Definition at line 175 of file ra8_fs_check.h.

Referenced by internal_exchk_bitmap_pass(), internal_fat_classify_one(), and internal_fat_fsinfo().

◆ clusters_lost

uint32_t ra8_fs_check_report_t::clusters_lost

Allocated but referenced by nothing; k_ra8_fs_check_unknown when ::referenced_scan is false.

Definition at line 178 of file ra8_fs_check.h.

Referenced by internal_exchk_diff_byte(), and internal_fat_diff().

◆ clusters_total

◆ clusters_used

uint32_t ra8_fs_check_report_t::clusters_used

Clusters that read as allocated.

Definition at line 176 of file ra8_fs_check.h.

Referenced by internal_exchk_bitmap_pass(), and internal_fat_classify_one().

◆ dirs_visited

uint32_t ra8_fs_check_report_t::dirs_visited

Directories walked.

Definition at line 183 of file ra8_fs_check.h.

Referenced by internal_exchk_tree(), and internal_fat_tree().

◆ entries_bad

uint32_t ra8_fs_check_report_t::entries_bad

◆ faults_total

uint32_t ra8_fs_check_report_t::faults_total

Every finding, across all categories (0 == clean).

Definition at line 185 of file ra8_fs_check.h.

Referenced by priv_check_fault().

◆ files_visited

uint32_t ra8_fs_check_report_t::files_visited

Files walked.

Definition at line 184 of file ra8_fs_check.h.

Referenced by internal_exchk_set_clusters(), and internal_fat_entry().

◆ first_fault

ra8_fs_check_fault_t ra8_fs_check_report_t::first_fault

Kind + location of the first finding.

Definition at line 186 of file ra8_fs_check.h.

Referenced by priv_check_fault().

◆ referenced_scan

bool ra8_fs_check_report_t::referenced_scan

true when a bitmap enabled the reference analysis.

Definition at line 173 of file ra8_fs_check.h.

◆ type

ra8_fs_type_t ra8_fs_check_report_t::type

The volume variant that was checked.

Definition at line 172 of file ra8_fs_check.h.

Referenced by internal_check_locked().


The documentation for this struct was generated from the following file: