SVN: geninitrd/trunk/geninitrd

czarny czarny at pld-linux.org
Wed May 16 08:51:48 CEST 2007


Author: czarny
Date: Wed May 16 08:51:47 2007
New Revision: 8559

Modified:
   geninitrd/trunk/geninitrd
Log:
- updated device matching rules for ceases like Patrys's fe 00


Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Wed May 16 08:51:47 2007
@@ -72,7 +72,7 @@
 	uname_r=$(uname -r)
 	echo "usage: $self [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
 	echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
-	echo "       [--initrdfs=rom|ext2|cram] [--modules-conf=<modules.conf>]"
+	echo "       [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=<modules.conf>]"
 	echo "       [--with-raidstart] [--without-raidstart] [--with-insmod-static]"
 	echo "       [--without-bootsplash] [--without-fbsplash]"
 	echo "       [--lvmtoolsversion=1|2] [--with-udev] [--without-udev]"
@@ -829,11 +829,11 @@
 if [ "x" = "x$INITRDFS" ] ; then
 	if [ "x" = "x$FS" ] ; then
 		# default value
-		if [ "$pack_version" -ge "002005" ] ; then
-			INITRDFS="initramfs"
-		else
+#		if [ "$pack_version" -ge "002005" ] ; then
+#			INITRDFS="initramfs"
+#		else
 			INITRDFS="rom"
-		fi
+#		fi
 	else
 		echo >&2 "Warning: FS configuration options is obsoleted. Use INITRDFS instead"
 		INITRDFS="$FS"
@@ -1411,8 +1411,8 @@
 CMDLINE="$(busybox cat /proc/cmdline)"
 eval "$(busybox awk -v c="$CMDLINE" '
 BEGIN {
-	num_pattern_short = "[0-9][0-9][0-9]";
-	num_pattern = "[0-9]" num_pattern_short;
+	num_pattern_short = "[0-9a-f][0-9a-f][0-9a-f]";
+	num_pattern = "[0-9a-f]" num_pattern_short;
 	dev_pattern = "[hms][a-z][a-z]([0-9])+";
 	partition = "no_partition_found";
 	min = -1; maj = -1;
@@ -1423,8 +1423,8 @@
 	sub("^0x", "", c);
 	if (c ~ "^" num_pattern_short "$") sub("^", "0", c);
 	if (c ~ "^" num_pattern  "$") {
-		maj = sprintf("%d",substr(c,1,2));
-		min = sprintf("%d",substr(c,3));
+		maj = sprintf("%s",substr(c,1,2));
+		min = sprintf("%s",substr(c,3));
 	}
 	if (c ~ "^\/dev\/" dev_pattern "$") sub("^/dev/","", c);
 	if (c ~ "^" dev_pattern "$") partition = c;
@@ -1434,7 +1434,7 @@
 $1 ~ maj && $2 ~ min { partition = $4; }
 
 END {
-	print sprintf("device=/dev/%s\nmaj=%d\nmin=%d",
+	print sprintf("device=/dev/%s\nmaj=%s\nmin=%s",
 		partition, maj, min);
 }
 ' /proc/partitions)"


More information about the pld-cvs-commit mailing list