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

Otavio Salvador otavio at ossystems.com.br
Mon May 30 14:54:17 UTC 2011


Signed-off-by: Otavio Salvador <otavio at 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(-)

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"
 
-- 
1.7.1





More information about the Openembedded-devel mailing list