code wiki / (root) / nx_fio.nx

nx_fio.nx

buildroot/runtime/nx_fio.nx

17774 B410 linesdepth 5pulls 5 transitivereach 586 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_fio.nx -- canonical sovereign file operations: unlink (delete) + existence check. Importable (no main). Retires Remove-Item / rm. rename is already canonical (sys_renameat in nx_syscalls). unlinkat x86_64=263 is passed DIRECTLY (the fsync-74 / fstatat-262 / unlinkat-263 precedent: a raw x86_64 number not in the rv64->x86 swap table passes through untranslated). AT_FDCWD=-100, flags=0. Returns 0 on success, -errno on failure. license_tier: ORIGINAL

dependencies 2 imports · 48 importers

nx_syscalls.nx nx_sha256.nx nx_fio.nx nx_accept.nx nx_accept_candidate_t230.nx nx_apistack_idempotency.nx nx_apistack_idempotency_candidate_ nx_apistack_idempotency_reconcile_ nx_body_gen.nx nx_body_gen_skin_candidate_t345.nx nx_body_gen_winding_candidate_t365 nx_body_profile_winding_candidate_ nx_cap_mint.nx

diagram shows first 10 each side; +0 more imports, +38 more importers in the complete lists below.

imports: nx_syscalls.nxnx_sha256.nx

imported by: nx_accept.nxnx_accept_candidate_t230.nxnx_apistack_idempotency.nxnx_apistack_idempotency_candidate_t190.nxnx_apistack_idempotency_reconcile_candidate_t219.nxnx_body_gen.nxnx_body_gen_skin_candidate_t345.nxnx_body_gen_winding_candidate_t365.nxnx_body_profile_winding_candidate_t366.nxnx_cap_mint.nxnx_cap_mint_candidate_t186.nxnx_claude_harvest.nxnx_claude_harvest_requests_t144.nxnx_compare_receipt_inspect_lib_t138.nxnx_comparestale_dependency_t138.nxnx_comparestale_edge_lib_t139.nxnx_comparestale_lib.nxnx_daemon_gate.nxnx_deploy_stage_candidate_t188.nxnx_deploy_stage_lib.nxnx_evidence_fleet.nxnx_evidence_fleet_t138.nxnx_file_install.nxnx_file_install.pre-toolchain-20260910.nxnx_file_install_session_20260910.nxnx_fileop.pre-intent-20260910.nxnx_fileop_gate.nxnx_fio_region_gate.nxnx_fio_write_gate.nxnx_fsops_gate.nxnx_fsops_lib.nxnx_fsops_lib_combined_t150.nxnx_fsops_lib_dynamic_edit_t145.nxnx_host_router.nxnx_mgmt_api.nxnx_mgmt_api.pre-toolchain-20260910.nxnx_mgmt_api_search_candidate_t330.nxnx_mgmt_api_toolchain_session_20260910.nxnx_mgmt_cap_candidate_t186.nxnx_mgmt_deploy_candidate_t185.nxnx_mgmt_private_response.nxnx_mgmt_private_response_candidate_t189.nxnx_mgmt_upload_gate.nxnx_orchestrate_raci.nxnx_orchestrate_raci_evaluate_t144.nxnx_swcompare_evidence_lib_t138.nxnx_swcompare_lib.nxnx_tls13_app_send_fd.nx

structs

15struct NxFileWriteResult
97struct NxFileReadRegion
179struct NxFilePrepareResult
241struct NxFilePublishResult
269struct NxFileTargetLock
316struct NxFileReplaceResult

consts

9const FIO_EINTR: i64 = 0 - 4
10const FIO_EIO: i64 = 0 - 5
11const FIO_EINVAL: i64 = 0 - 22
12const FIO_EEXIST: i64 = 0 - 17
13const FIO_EBADMSG: i64 = 0 - 74 // Linux ABI: artifact digest mismatch.

functions

24func fio_write_sync_fd(fd: i64, body: *u8, n: i64, result: *NxFileWriteResult) -> i64
57func fio_sync_parent(path: *u8, result: *NxFileWriteResult) -> i64
89func fio_exists(path: *u8) -> i64
108func fio_region_init(r: *NxFileReadRegion) -> i64
114func fio_region_close(r: *NxFileReadRegion) -> i64
122func fio_region_fail(r: *NxFileReadRegion,stage: *u8,code: i64) -> i64
127func fio_region_open(path: *u8,r: *NxFileReadRegion) -> i64
143func fio_region_select(r: *NxFileReadRegion,start: i64,length: i64) -> i64
153func fio_region_next(r: *NxFileReadRegion,out: *u8,cap: i64) -> i64
188func fio_prepare_copy(source: *u8,candidate: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFilePrepareResult) -> i64
249func fio_publish_candidate(candidate: *u8,live: *u8,out: *NxFilePublishResult) -> i64
276func fio_target_lock_init(lock: *NxFileTargetLock) -> i64
280func fio_target_lock_release(lock: *NxFileTargetLock) -> i64
291func fio_target_lock_acquire(live: *u8,lock: *NxFileTargetLock) -> i64
326func fio_replace_owned(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64
352func fio_replace_init(out: *NxFileReplaceResult) -> i64
359func fio_replace_core(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64
368func fio_replace_with_backup(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,out: *NxFileReplaceResult) -> i64
372func fio_replace_verified(source: *u8,live: *u8,candidate: *u8,backup: *u8,mode: i64,buffer: *u8,capacity: i64,expected_candidate: *u8,expected_live: *u8,out: *NxFileReplaceResult) -> i64
385func fio_verify_sha256(path: *u8,expected: *u8,buffer: *u8,capacity: i64) -> i64