nx_torrent_doctor.nx
buildroot/runtime/nx_torrent_doctor.nx
about
nx_torrent_doctor.nx -- SOVEREIGN torrent diagnostic (replaces shell dumps; SHELL IS BLEED). Scans the
download outdir (sys_getdents64, no ls/find) and reports every torrent's live state from its download.status
+ download.control, then a summary classifying each (downloading-with-progress / stalled / finalized / etc.)
so "can't download multiple" becomes a measured fact, not a guess. Usage: nx_torrent_doctor. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 6 | const K_MAGIC_1024: i64 = 1024 |
| 7 | const K_MAGIC_4096: i64 = 4096 |
| 9 | const DBUF: i64 = 65536 |
| 10 | const OUT: *u8 = "/mnt/c/Users/elder/Downloads/nishi-torrents" as *u8 |
functions
| 12 | func dr_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func dr_n(v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m; sys_write(1,"-" as *u8,1)} var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} let b: *u8=sys_mmap(28); var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 } |
| 14 | func dr_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 15 | func dr_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){dst[off+i]=s[i];i=i+1} return off+dr_len(s) } |
| 18 | func dr_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 25 | func dr_getval(buf: *u8, n: i64, key: *u8, out: *u8, ocap: i64) -> i64 |
| 45 | func dr_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v } called by 1: dr_atoi_kv |
| 47 | func dr_atoi_kv(buf: *u8, n: i64, key: *u8) -> i64 |
| 51 | func main() -> i64 |