Re: Linux 3.0-rc3

From: Denys Vlasenko
Date: Tue Jun 14 2011 - 09:10:50 EST


On Tue, Jun 14, 2011 at 2:55 PM, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> On Tue, Jun 14, 2011 at 3:15 PM, Denys Vlasenko
> <vda.linux@xxxxxxxxxxxxxx> wrote:
>> I've got a patch for my project to fix parsing of kernel version which
>> has only two numbers. Basically,
>
> Why does your project care about kernel version?

It's depmod. It was assuming that if argument starts with three digits,
it's a kernel version:

/* If a version is provided, then that kernel version's module directory
* is used, rather than the current kernel version (as returned by
* "uname -r"). */
if (*argv && sscanf(*argv, "%u.%u.%u", &tmp, &tmp, &tmp) == 3) {
version = *argv++;
} else {
uname(&uts);
version = uts.release;
}


--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/