Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
| KERNELINFO(2) | System Calls Manual | KERNELINFO(2) |
NAME
kernelinfo — get
information about the system
SYNOPSIS
#include
<sys/kernelinfo.h>
ssize_t
kernelinfo(const
char *request, char
*response, size_t
resplen);
DESCRIPTION
kernelinfo()
queries information about the currently running system, storing up to
resplen bytes (including the terminating NUL byte) in
response.
request is a string requesting one of the following pieces of information:
- "name"
- The kernel's name, e.g. "Sortix".
- "version"
- The kernel's version, e.g. "1.1.0-dev".
- "tagline"
- The kernel's tagline, e.g. "\"Self-Hosting & Installable\"".
- "options"
- The options the kernel was booted with, e.g. "--firmware=pc". See kernel(7) for details.
- "builddate"
- The date when the kernel was built per the C
__DATE__macro, e.g. "Feb 13 2009". - "buildtime"
- The time when the kernel was built per the C
__TIME__macro, e.g. "23:31:30". - "firmware"
- The system's firmware, e.g. "bios" or "efi".
RETURN VALUES
On success, zero is returned. If the information doesn't fit in
the response, then the needed size (excluding the NUL
byte) is returned and errno is set to
ERANGE, and nothing is written to the
response. On any other error, -1 is returned and
errno is set, and nothing is written to the
response.
ERRORS
SEE ALSO
HISTORY
The kernelinfo syscall originally appeared
in Sortix 0.6.
| November 15, 2025 | Sortix 1.1.0-dev |