| Summary: | linux kernel 3.0 will use two digit in uname instead of three digit | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Arkadiusz Miskiewicz <arekm> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | minor | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | proposed fix for the issue | ||
> linux kernel 3.0 will use two digit in uname
Considering that this is a PITA for many similar code parts, I expect Linux kernel to return to three-digit numbering. Let's wait and see.
This fix will work with both, 2 and 3 digit kernel versions. It's unlikely Linus will return to 3 digits since he already merged few very hacky patches that workaround the problem with old depmods. > It's unlikely Linus will return to 3 digits since he already merged few very
> hacky patches that workaround the problem with old depmods.
So, what next versions will be? 3.1, 3.2, 3.3? I don't think so.
Exactly that. Linux releases 3.0, 3.1, 3.2 while stable team gets third digit - 3.0.0, 3.0.1 and so on. https://groups.google.com/group/linux.kernel/browse_thread/thread/3d41c0c994cd5313/44cadace5bbcea34?hl=pl&ie=UTF-8&oe=utf-8&q=linux+kernel+3.0rc1+linus+torvalds+group:linux.kernel "I decided to just bite the bullet, and call the next version 3.0. It will get released close enough to the 20-year mark, which is excuse enough for me, although honestly, the real reason is just that I can no longe rcomfortably count as high as 40. ... Now, my alpha-maleness sadly does not actually extend to all the scripts and Makefile rules, so the kernel is fighting back, and is calling itself 3.0.0-rc1. We'll have the usual 6-7 weeks to wrestle it into submission, and get scripts etc cleaned up, and the final release should be just "3.0". The -stable team can use the third number for their versioning." Created attachment 3475 [details] proposed fix for the issue This change for libbb/kernel_version.c fixes the issue. Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru> I tested current code on 3.1-rc4 and it seems to work fine. Only because Linus finally didn't make 2-digit version reporting in uname. Kernel 3.0 reports 3.0.0. I guess too many things broke and thus 3-digit version is reported. |
linux kernel 3.0 will use two digit in uname instead of three digit thus modutils/depmod.c check becomes invalid: if (*argv && sscanf(*argv, "%u.%u.%u", &tmp, &tmp, &tmp) == 3) { version = *argv++; } else { Solution is to use: if (*argv && sscanf(*argv, "%u.%u", &tmp, &tmp) == 2) { which should work for 2 and 3 digit versions. Same fix was commited to module-init-tools.