This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] fix kernel version parsing when it has more than 3 components
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 7 Jul 2007 12:29:09 +0000 (UTC)
- Subject: Re: [patch] fix kernel version parsing when it has more than 3 components
- References: <200707070502.00621.vapier@gentoo.org>
On Sat, 7 Jul 2007, Mike Frysinger wrote:
> with kernel versions having more than 3 components being common place, a bug
> was noticed in _dl_discover_osversion() where it would parse all parts of the
> kernel version rather than just consuming the first 3. for example, the
> function would return incorrect values when running on "2.6.21.5" but would
> work properly on "2.6.21". the attached patch fixes this by bailing out
> after processing the first three components.
A patch to do this was previously submitted by Daniel
<http://sourceware.org/ml/libc-alpha/2003-11/msg00010.html> (and rejected;
at that time this version format may not have been in use by standard
kernels, whereas it is now).
--
Joseph S. Myers
joseph@codesourcery.com