nx_env.nx
buildroot/runtime/nx_env.nx
about
nx_env.nx -- environment variable lookup over the System V envp.
At program entry the kernel hands us argc + argv + envp. envp is
a NULL-terminated array of "KEY=VALUE" strings. This module
searches envp for a given key and returns the value pointer (NUL-
terminated) or NULL.
Callers (toolchain): NX_NXC_PATH, NX_DEBUG, HOME, PATH, etc.
We don't mutate envp -- this is a pure read interface. Setenv
would require redirecting stdlib calls, which the off-C runtime
doesn't have anyway.
dependencies 2 imports · 0 importers
imports: syscalls.nxruntime.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
| none |
functions
| 27 | func nx_env_key_match(entry: *u8, key: *u8) -> i64 called by 1: nx_env_get |
| 42 | func nx_env_get(envp: *i64, key: *u8) -> *u8 |
| 56 | func nx_env_count(envp: *i64) -> i64 called by 1: main |
| 64 | func main() -> i64 |