2013-08-07 06:41:42 -04:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
2013-08-06 15:08:41 -04:00
|
|
|
#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);
|
|
|
|
}
|