[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Detect dmesg log buffer size so as not to annoy the hell
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2009-07-10 14:11:00
Message-ID: 200907101011.02017.vapier () gentoo ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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

["signature.asc" (application/pgp-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic