systm(9lua) - NetBSD Manual Pages

SYSTM(9lua)                          LOCAL                         SYSTM(9lua)


NAME
systm -- access to general kernel functionality from Lua
SYNOPSIS
local systm = require 'systm' systm.print(msg) systm.print_nolog(msg) systm.uprint(msg) systm.aprint_normal(msg) systm.aprint_naive(msg) systm.aprint_verbose(msg) systm.aprint_debug(msg) systm.aprint_error(msg) count = systm.aprint_get_error_count() systm.panic(msg)
DESCRIPTION
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) Send msg to the console. systm.print_nolog(msg) The systm.print_nolog() function is identical to the systm.print() function, except is does not send msg to the system log. systm.uprint(msg) Send msg to the current process's controlling tty. systm.aprint_normal(msg) Send msg to the console unless AB_QUIET is set. Always sends to the log. systm.aprint_naive(msg) Send msg to the console only if AB_QUIET is set. Never sends to the log. systm.aprint_verbose(msg) Send msg to the console only if AB_VERBOSE is set. Always sends to the log. systm.aprint_debug(msg) Send msg to the console and the log only if AB_DEBUG is set. systm.aprint_error(msg) Like 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() The systm.aprint_get_error_count() function reports the number of errors and resets the counter to 0. systm.panic(msg) The systm.panic() function terminates the NetBSD system. The mes- sage 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.
VARIABLES
Upon initialisation, the systm module sets the following variables with the values of the corresponding kernel variable: systm.copyright systm.cpu_model systm.machine systm.machine_arch systm.osrelease systm.ostype systm.kernel_ident systm.version systm.ncpu
SEE ALSO
lua(1), luac(1), lua(4), intro(9lua)
HISTORY
An systm manual appeared in NetBSD 7.0.
AUTHORS
The systm Lua binding was written by Marc Balmer <mbalmer@NetBSD.org>. NetBSD 9.4 October 29, 2013 NetBSD 9.4

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.