Add bindings for kenv(2) right now only get() has been created
it allows do dump into a key/value table the kernel environement if
no argument is passed, or it returns the value associated to the
provided key.
Details
Details
- Reviewers
markj imp kevans - Commits
- rG696922fbfa3e: flua: add freebsd.kenv, kenv(2) bindings
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I like this interface. Should we need to share code between userland and the loader that needs to access this interface, I think it can be trivially implemented in lua using the loader's loader.getenv for both variations. I don't think it's required that we implement that today, though.
libexec/flua/libfreebsd/kenv/freebsd.kenv.3lua | ||
---|---|---|
58–64 | Return the |
libexec/flua/libfreebsd/kenv/kenv.c | ||
---|---|---|
16 | s/REGENTS/AUTHOR/ ? |
libexec/flua/libfreebsd/kenv/kenv.c | ||
---|---|---|
75 | It just occurred to me that all of these lua_pushnil in error paths should technically be luaL_pushfail in flua/5.4. That's an alias for lua_pushnil still in 5.4, so I don't insist on fixing this now / we can clean it up later in a larger cleanup pass. |