code wiki / _hdl_build / nx_fix_ok.nx
nx_fix_ok.nx source
↩ module page · 15 lines · 538 B
1// nx_fix_ok.nx -- seat-drive gate FIXTURE: succeed, optionally writing a marker artifact.
2// argv: [marker-path] -> writes "OK\n" to marker-path if given, exits 0.
3// Used by nx_seat_drive_gate as a stand-in work/gate step (artifact-truth positive control).
4// license_tier: ORIGINAL No hw writes (Rule 26).
5import "nx_seg_store.nx"
6import "nx_syscalls.nx"
7
8func main(argc: i64, argv: *i64) -> i64 {
9 if argc >= 2 {
10 let p: *u8 = argv[1] as *u8
11 ss_writefile(p, "OK\n" as *u8, 3)
12 }
13 sys_exit(0)
14 return 0
15}