[PATCH 3/3] syslogd: add option to log to Linux kernel printk buffer
Mike Frysinger
vapier at gentoo.org
Sat Jan 5 21:21:37 UTC 2013
On Tuesday 18 December 2012 14:49:20 Peter Korsgaard wrote:
> + /*
> + kernel < 3.5 expects single char printk KERN_* priority prefix,
> + from 3.5 onwards the full syslog facility/priority format is supported
> + */
comment style is slightly off. needs '*' at the start of each line.
> + if (get_linux_version_code() < KERNEL_VERSION(3,5,0))
> + pri &= LOG_PRIMASK;
> +
> + write(G.kmsgfd, G.printbuf, sprintf(G.printbuf, "<%d>%s\n", pri, msg));
so this calls uname() every time we write() ? can't this be optimized a bit ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20130105/2769834b/attachment.asc>
More information about the busybox
mailing list