code wiki / _hdl_build / nx_hub_publish_hostctl.nx

nx_hub_publish_hostctl.nx source

↩ module page · 15 lines · 1430 B

1// nx_hub_publish_hostctl.nx -- submit the SUPERVISOR (nx_hostctl, now carrying the HC_HUB_GW guard) to the 2// publisher (outward, operator-approval-gated). Separate one-shot so re-runs never duplicate other rows. 3// The live supervisor must carry HC_HUB_GW to launch+guard nx_hub_gw; promote = the F-class hostctl selfswap. 4// Sovereign: nx_syscalls + nx_publisher. license_tier: ORIGINAL 5import "nx_syscalls.nx" 6import "nx_publisher.nx" 7func pp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } 8func pn(v: i64) -> i64 { var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let bb: *u8=sys_mmap(28); var k: i64=0; if m==0 { bb[0]=48 as u8; sys_write(1,bb,1); return 0 } let t: *u8=sys_mmap(28); while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var i: i64=0; while i<k { bb[i]=t[k-1-i]; i=i+1 } sys_write(1,bb,k); return 0 } 9func main(argc: i64, argv: *i64) -> i64 { 10 pp("=== nx_hub_publish_hostctl: supervisor (HC_HUB_GW) -> publisher queue (outward, operator-approval-gated) ===\n" as *u8) 11 let r: i64 = pub_submit("_offc/nx_hostctl.elf" as *u8, "/volume1/homes/elderwesto/nishihost/nx_hostctl.new" as *u8, "nishifamily.com" as *u8, "elderwesto" as *u8, "outward" as *u8) 12 pp(" submit nx_hostctl (+HC_HUB_GW supervision) -> " as *u8) 13 if r == 1 { pp("QUEUED\n" as *u8); sys_exit(0); return 0 } 14 pp("FAIL r=" as *u8); pn(r); pp("\n" as *u8); sys_exit(1); return 1 15}