nx_state_spool.nx
buildroot/runtime/nx_state_spool.nx
about
nx_state_spool.nx -- CLI of the store-and-forward state spool (CR-R1a; NAS=hub, laptop=worker:
sync to the NAS whenever reachable, go local when it isn't, drain on reconnect).
usage:
nx_state_spool spool <spoolfile> <line> append one state line locally (flock'd)
nx_state_spool drain <spoolfile> <transport_elf> deliver each line via transport (argv[1]=
line, exit 0=delivered); failures KEPT
lock = <spoolfile>.lock, tmp = <spoolfile>.tmp (atomic rewrite). Exit 0 on success (kept>0 is
NOT an error -- offline is a normal state); 2 = usage; 3 = spool/lock failure.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_state_spool_core.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const K_MAGIC_1024: i64 = 1024 |
functions
| 14 | func sp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 16 | func sp_putn(v: i64) -> i64 |
| 23 | func sp_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 30 | func main(argc: i64, argv: *i64) -> i64 |