[PATCH] depmod: Handle X.Y kernel versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What a stupid check.

Signed-off-by: Michal Marek <mmarek@xxxxxxx>
---

Jon, could you please apply this patch and release a new
module-init-tools?  Depmod otherwise fails when building a kernel with
version 3.0 (without the third number).

Linus, I'm affraid this ruins the plan for Linux 3.0. Except if you want
to force users to upgrade module-init-tools, with the excuse that 3.0
is a huge step forward and breakage has to be expected ;-).

Michal
---
 depmod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/depmod.c b/depmod.c
index abfb11e..98a5efa 100644
--- a/depmod.c
+++ b/depmod.c
@@ -247,7 +247,7 @@ static int is_version_number(const char *version)
 {
 	unsigned int dummy;
 
-	return (sscanf(version, "%u.%u.%u", &dummy, &dummy, &dummy) == 3);
+	return (sscanf(version, "%u.%u", &dummy, &dummy) == 2);
 }
 
 static int old_module_version(const char *version)
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux