Author: glen
Date: Mon Jan 28 11:10:46 2008
New Revision: 9205

Modified:
   geninitrd/trunk/geninitrd
Log:
- small optimize for root=

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd   (original)
+++ geninitrd/trunk/geninitrd   Mon Jan 28 11:10:46 2008
@@ -1524,9 +1524,8 @@
 initrd_gen_procdata() {
        debug "Adding rootfs finding based on kernel cmdline root= option 
support."
        add_linuxrc <<-'EOF'
-               [ "${ROOT##/dev/}" != "${ROOT}" ] && root="${ROOT##/dev/}"
-               if [ -n "$root" ]; then
-                       rootnr="$(busybox awk -v root="$root" ' { if ($4 == 
root) { print 256*$1+$2; } } ' /proc/partitions)"
+               if [ "${ROOT##/dev/}" != "${ROOT}" ]; then
+                       rootnr="$(busybox awk -v rootnode="${ROOT##/dev/}" '$4 
== rootnode { print 256 * $1 + $2 }' /proc/partitions)"
                        if [ -n "$rootnr" ]; then
                                echo "$rootnr" > /proc/sys/kernel/real-root-dev
                        fi
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to