Patchwork [11/17] initramfs-module-ext3: port to new getarg API

login
register
mail settings
Submitter Otavio Salvador
Date May 30, 2011, 2:54 p.m.
Message ID <1306767263-29895-12-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/5061/
State New, archived
Headers show

Comments

Otavio Salvador - May 30, 2011, 2:54 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 recipes/initrdscripts/files/80-ext3.sh             |   16 ++++++----------
 recipes/initrdscripts/initramfs-module-ext3_1.0.bb |    2 +-
 2 files changed, 7 insertions(+), 11 deletions(-)

Patch

diff --git a/recipes/initrdscripts/files/80-ext3.sh b/recipes/initrdscripts/files/80-ext3.sh
index 1f52d39..ff37e0f 100644
--- a/recipes/initrdscripts/files/80-ext3.sh
+++ b/recipes/initrdscripts/files/80-ext3.sh
@@ -5,13 +5,9 @@  ext3_mount () {
 	mount -t ext3 -onoatime,data=journal,errors=continue $1 $2
 }
 
-for arg in $CMDLINE; do
-    optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
-    echo $arg xxx $optarg 
-    case $arg in
-        ext3=*)
-        dev=`expr "$optarg" : '\([^:]*\).*'`
-        path=`expr "$optarg" : '[^:]*:\([^:]*\).*'`
-        ext3_mount $dev $path ;;
-    esac
-done
+ext3=$(getarg ext3=)
+if [ -n "$ext3" ]; then
+        dev=`expr "$ext3" : '\([^:]*\).*'`
+        path=`expr "$ext3" : '[^:]*:\([^:]*\).*'`
+        ext3_mount $dev $path
+fi
diff --git a/recipes/initrdscripts/initramfs-module-ext3_1.0.bb b/recipes/initrdscripts/initramfs-module-ext3_1.0.bb
index 869ff05..cabffab 100644
--- a/recipes/initrdscripts/initramfs-module-ext3_1.0.bb
+++ b/recipes/initrdscripts/initramfs-module-ext3_1.0.bb
@@ -1,5 +1,5 @@ 
 SRC_URI = "file://80-ext3.sh"
-PR = "r2"
+PR = "r3"
 DESCRIPTION = "An initramfs module for mount ext3."
 RDEPENDS_${PN} = "initramfs-uniboot"