[PATCH] Detect dmesg log buffer size so as not to annoy the hell out of me
Mike Frysinger
vapier at gentoo.org
Fri Jul 10 14:11:00 UTC 2009
On Friday 10 July 2009 08:19:19 walter harms wrote:
> hi randy,
please do not top post
> the klogctl(10, NULL, 0) is only available since 2.6.6
> a lot of embedded systems are still using 2.4.x.
the patch Randy posted already has fallback logic. if run on an older kernel,
klogctl() will return an error and the code will default to 16k. in fact,
your proposed code too has the fallback logic.
> > + len = klogctl(10, NULL, 0);
> > + if (len <= 0)
> > + len = 16384;
there is no build time error thus no need to check the kernel version. in
general, checking the kernel version at build time via #if is broken.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090710/df28b724/attachment.pgp>
More information about the busybox
mailing list