code wiki / _hdl_build / nx_galx_put.nx
nx_galx_put.nx
buildroot/runtime/_hdl_build/nx_galx_put.nx
about
nx_galx_put.nx -- CLI + gate for the native cid->path insert. Retires the TSV write path.
Usage:
nx_galx_put <idx> <blob> <cid> <path> [<cid> <path> ...] insert
nx_galx_put --gate <idx> <blob> self-check on COPIES only
⚠VISIBILITY, STATED PLAINLY: nx_gallery_serve loads the idx+blob into its own memory ONCE at
startup (sys_read_file, a copy -- not a shared mapping), so a live server does NOT see an insert
until it restarts. The insert itself is now native and O(1); making it visible without a restart
requires the server to map the index MAP_SHARED, which is a change to a running daemon and is
filed rather than smuggled in here.
★ REPORTING "INSERTED" WOULD BE TRUE AND STILL MISLEAD -- the reader is the only judge of
whether an image is servable, so say which half you did.
license_tier: ORIGINAL
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_strconv.nxnx_galx_cid_index.nxnx_galx_cidput.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
| 20 | const K_MAGIC_1024: i64 = 1024 |
functions
| 22 | func gp_puts(s: *u8) -> i64 |
| 27 | func gp_i(v: i64) -> i64 |
| 31 | func gp_verdict(rc: i64) -> i64 |
| 41 | func gp_lookup(idx_path: *u8, blob_path: *u8, cid: *u8, out: *u8) -> i64 |
| 51 | func main(argc: i64, argv: *i64) -> i64 |