SYSTM(9lua) | LUA Kernel Developer's Manual | SYSTM(9lua) |
systm
— access to
general kernel functionality from Lua
local systm = require 'systm'
The systm
Lua binding provides access to
general kernel functionality like printing messages on the console. The
systm.aprint
functions are meant to be using during kernel autoconfiguration.
systm.print(msg)
systm.print_nolog(msg)
systm.print_nolog
()
function is identical to the
systm.print
()
function, except is does not send msg to the system
log.
systm.uprint(msg)
systm.aprint_normal(msg)
systm.aprint_naive(msg)
systm.aprint_verbose(msg)
systm.aprint_debug(msg)
systm.aprint_error(msg)
systm.aprint_normal
(),
but also keeps track of the number of times called. This allows a
subsystem to report the number of errors that occurred during a quiet or
silent initialization phase.
count =
systm.aprint_get_error_count()
systm.aprint_get_error_count
()
function reports the number of errors and resets the counter to 0.
systm.panic(msg)
systm.panic
()
function terminates the NetBSD system. The message
msg is printed to the console and saved in the
variable
panicstr
for later retrieval via core dump inspection. A newline character is added
at the end automatically.Upon initialisation, the systm
module sets
the following variables with the values of the corresponding kernel
variable:
An systm
manual appeared in
NetBSD 7.0.
The systm
Lua binding was written by
Marc Balmer
<mbalmer@NetBSD.org>.
October 29, 2013 | NetBSD 10.99 |