code wiki / _hdl_build / nx_put.nx
nx_put.nx
buildroot/runtime/_hdl_build/nx_put.nx
about
nx_put.nx -- GENERIC sovereign file uploader over the team's own SSH (DRY: ssh_put_file was
copy-pasted into nx_vroom_deploy / nx_vroom_html / nx_translate_deploy = the 3+ threshold).
Reads three /tmp inputs and streams a local file to the NAS:
/tmp/nxpw -- ssh password
/tmp/nxput_src -- LOCAL path of the file to upload
/tmp/nxput_dst -- the remote command to receive it, e.g. "cat > /volume1/.../foo.elf.new"
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
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
structs
| none |
consts
| 10 | const K_MAGIC_1048576: i64 = 1048576 |
| 11 | const K_MAGIC_16384: i64 = 16384 |
| 12 | const K_MAGIC_65536: i64 = 65536 |
| 13 | const K_MAGIC_1024: i64 = 1024 |
functions
| 15 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=0 as u8 { n=n+1 } return n } |
| 16 | func rstrip(s: *u8, n: i64) -> i64 called by 1: main |
| 23 | func ssh_put_file(st: *SshState, wcmd: *u8, wcmdlen: i64, data: *u8, datalen: i64) -> i64 |
| 59 | func main() -> i64 |