code wiki / _hdl_build / nx_reader_diag.nx

nx_reader_diag.nx

buildroot/runtime/_hdl_build/nx_reader_diag.nx

5638 B86 linesdepth 10pulls 22 transitivereach 0 importersview sourcekind tooltopic reader
docsdependenciesstructsconstsfunctions

about

nx_reader_diag.nx -- run the EXACT live manga-download command ON THE NAS (from the reader daemon's own working directory) over our sovereign SSH, streaming the real output back. Ends the "worked locally, failed live" guessing: shows whether knowledge/staging/media/reader/ exists, whether certdata resolves, and whether the fork actually downloads+writes -- exactly what the daemon's /api/manga/add fork does. Reuses the nx_aw_hostctl SSH spine.

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_ssh_lib.nx nx_reader_diag.nx

imports: nx_syscalls.nxnx_ssh_lib.nx

imported by: nobody (leaf or entry point)

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

main dg_run sys_fork sys_mmap sys_execve sys_exit sys_wait4 dg_napms sys_mmap ↻ dg_unlink ssh_puts sys_write sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ssh_open_session sys_socket sys_mmap ↻ ssh_sockaddr nx_connect_bounded nx_fcntl sys_connect sys_mmap ↻ sys_poll ssh_kex sys_write ↻ sys_mmap ↻ ssh_read_line sys_read ↻ ssh_read_packet sys_mmap ↻ ssh_read_full sys_read ↻ ssh_u32be ssh_put_bytes ssh_put_byte

structs

none

consts

7const DG_MAGIC_1000000: i64 = 1000000
8const DG_MAGIC_65536: i64 = 65536
9const DG_MAGIC_1048576: i64 = 1048576
10const DG_MAGIC_16384: i64 = 16384
11const DG_MAGIC_4096: i64 = 4096
13const DG_VAULT_NV: *u8 = "/home/elderwesto/.nishi/secrets/nas.nv" as *u8
14const DG_SECRET_OUT:*u8 = "/tmp/nxsecret.out" as *u8

functions

16func dg_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: main
18func dg_napms(ms: i64) -> i64 { let ts: *i64 = sys_mmap(16) as *i64; ts[0]=0; ts[1]=ms*DG_MAGIC_1000000; __syscall(35, ts as i64, 0,0,0,0,0); return 0 }
called by 1: main calls 1: sys_mmap
19func dg_run(path: *u8, a1: *u8, a2: *u8) -> i64
31func dg_drain(st: *SshState) -> i64
41func dg_exec(st: *SshState, wcmd: *u8, wcmdlen: i64) -> i64
66func main() -> i64