Bug#504555: initramfs-tools: fix reboot partition support
Package: initramfs-tools
Version: 0.92l
Severity: normal
Hi,
Redboot partitioning (used by mtd devices) provides devices with names like
"mtd:foo". Unfortunately, when booting with root=mtd:foo, the "*:*" check in
parse_numeric is matched and things break (the code expects major:minor
numbers). This patch fixes that by explicitly checking for something that
starts with a number.
>From 7651875d24f8e35bf4b601beef7b7a4e8b92ad9d Mon Sep 17 00:00:00 2001
From: Andres Salomon <dilinger@debian.org>
Date: Fri, 17 Oct 2008 17:56:22 -0400
Subject: [PATCH] fix redboot partition support
Fix buglet in parse_numeric where *:* would match mtd:root. We only
want to match numbers. This fixes redboot partition support.
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
debian/changelog | 2 ++
scripts/functions | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4fdf762..20af58e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ initramfs-tools (0.92l.1) unstable; urgency=high
* include video (framebuffer, fbcon) modules when 'most' is selected.
* allow root=mtd0 to be used; skip root checks if ROOT doesn't start
with /dev.
+ * Fix buglet in parse_numeric where *:* would match mtd:root. We only
+ want to match numbers. This fixes redboot partition support.
-- Andres Salomon <dilinger@debian.org> Tue, 14 Oct 2008 14:16:50 -0400
diff --git a/scripts/functions b/scripts/functions
index 299c29c..ba6b2fc 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -238,7 +238,7 @@ parse_numeric() {
/*)
return
;;
- *:*)
+ [0-9]*:[0-9]*)
minor=${1#*:}
major=${1%:*}
;;
--
1.5.6.5
Reply to: