ubase/linux/syslog.c
sin 7b228e69b7 Add dmesg(1)
No manpage yet.
2013-08-06 20:58:13 +01:00

20 lines
284 B
C

#include <sys/klog.h>
#include <stdio.h>
enum {
SYSLOG_ACTION_READ_ALL = 3,
SYSLOG_ACTION_SIZE_BUFFER = 10
};
int
syslog_size(void)
{
return klogctl(SYSLOG_ACTION_SIZE_BUFFER, NULL, 0);
}
int
syslog_read(void *buf, size_t n)
{
return klogctl(SYSLOG_ACTION_READ_ALL, buf, n);
}