[PATCH 3/3] syslogd: add option to log to Linux kernel printk buffer

Mike Frysinger vapier at gentoo.org
Sun Jan 6 02:07:10 UTC 2013


On Saturday 05 January 2013 18:07:19 Peter Korsgaard wrote:
> +#else
> +void kmsg_init(void);
> +void kmsg_cleanup(void);
> +void log_to_kmsg(int pri, const char *msg);
> +#endif /* FEATURE_KMSG_SYSLOG */
> ...
> +	if (ENABLE_FEATURE_KMSG_SYSLOG && (option_mask32 & OPT_kmsg)) {
> +		log_to_kmsg(pri, msg);
> +		return;
> +	}

if you had the fallback funcs be static inline stubs, i think you could delete 
the constant ENABLE_FEATURE_KMSG_SYSLOG checks.

void kmsg_init(void) {}
...
	if (option_mask32 & OPT_kmsg) {
		log_to_kmsg(pri, msg);
		return;
	}
-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/6d541d32/attachment.asc>


More information about the busybox mailing list