code wiki / _hdl_build / nx_vfs_blockfs.nx

nx_vfs_blockfs.nx

buildroot/runtime/_hdl_build/nx_vfs_blockfs.nx

6976 B101 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_vfs_blockfs.nx -- GATE: the hierarchical VFS MOUNTED ON the block filesystem (NSFS v2, nx_vfsblock_lib). Closes the FILESYSTEM census gap half "block-backed VFS mount": the WHOLE namespace (dirs + files + hierarchy) lives in the block image and survives save -> clear -> reload -> MOUNT. Grounded on the banked field research (osb_vfs/osb_mount/osb_inode: mount = attach a validated on-disk FS into the namespace; inode = the on-disk record). Research-grounded exceed kept honest: this is OUR OWN format (NSFS v2), not ext/FAT. T1 format + mount (superblock magic+version validated, root dir valid, empty). T2 build a REAL tree with nesting -- /docs /src /docs/sub + 3 files -- resolve + read + ls all correct. T3 THE MOUNT PROOF: save image -> zero RAM -> load -> mount -> paths resolve + content byte-exact + ls intact. T4 teeth: corrupt a data byte in the image -> per-file checksum DETECTS; restore -> clean again. T5 teeth: corrupt the superblock magic -> mount REFUSED (-1); restore -> mounts again. expect_exit: 0 Sovereign: nx_cc->nxasm via nx_syscalls. NEVER-BRICK: RAM + an image file, 0 firmware writes.

dependencies 2 imports · 0 importers

nx_vfsblock_lib.nx nx_itoa_lib.nx nx_vfs_blockfs.nx

imports: nx_vfsblock_lib.nxnx_itoa_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_puts vb_format vb_wr vb_ino vb_nm_set vb_mount vb_rd vbj_replay vbj_hdr vb_rd ↻ vbj_sumrecs vbj_hdr ↻ vb_rd ↻ vb_sum vbj_rec vbj_checkpoint vbj_hdr ↻ vb_wr ↻ vbj_apply vbj_hdr ↻ vb_rd ↻ vbj_rec ↻ vb_ino ↻ vb_resolve sys_mmap vb_lookup vb_ino ↻ vb_rd ↻ vb_nm_eq vb_lscount vb_rd ↻ vb_ino ↻ g_pn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write sys_munmap

structs

none

consts

none

functions

15func g_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: ckmain
20func g_pn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
21func ck(name: *u8, c: i64) -> i64 { if c==1 { g_puts(" PASS " as *u8) } else { g_puts(" FAIL " as *u8) } g_puts(name); g_puts("\n" as *u8); return c }
called by 1: main calls 1: g_puts
22func streq_n(a: *u8, b: *u8, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 }
called by 1: main
23func wlog(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main
25func main() -> i64