[oe] [PATCH 10/17] initramfs-module-squashfs: port to new getarg API
Otavio Salvador
otavio at ossystems.com.br
Mon May 30 14:54:16 UTC 2011
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
recipes/initrdscripts/files/80-squashfs.sh | 18 +++++++-----------
.../initrdscripts/initramfs-module-squashfs_1.0.bb | 2 +-
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/recipes/initrdscripts/files/80-squashfs.sh b/recipes/initrdscripts/files/80-squashfs.sh
index 22c0954..6150bf9 100644
--- a/recipes/initrdscripts/files/80-squashfs.sh
+++ b/recipes/initrdscripts/files/80-squashfs.sh
@@ -1,17 +1,13 @@
squashfs_mount () {
modprobe -q squashfs
- mkdir $2
+ mkdir -p $2
mount -t squashfs $1 $2
}
-for arg in $CMDLINE; do
- optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
- echo $arg xxx $optarg
- case $arg in
- squashfs=*)
- dev=`expr "$optarg" : '\([^:]*\).*'`
- path=`expr "$optarg" : '[^:]*:\([^:]*\).*'`
- squashfs_mount $dev $path ;;
- esac
-done
+squashfs=$(getarg squashfs=)
+if [ -n "$squashfs" ]; then
+ dev=`expr "$squashfs" : '\([^:]*\).*'`
+ path=`expr "$squashfs" : '[^:]*:\([^:]*\).*'`
+ squashfs_mount $dev $path
+fi
diff --git a/recipes/initrdscripts/initramfs-module-squashfs_1.0.bb b/recipes/initrdscripts/initramfs-module-squashfs_1.0.bb
index fcf3f97..0309ba5 100644
--- a/recipes/initrdscripts/initramfs-module-squashfs_1.0.bb
+++ b/recipes/initrdscripts/initramfs-module-squashfs_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://80-squashfs.sh"
-PR = "r2"
+PR = "r3"
DESCRIPTION = "An initramfs module for mount squashfs."
RDEPENDS_${PN} = "initramfs-uniboot"
--
1.7.1
More information about the Openembedded-devel
mailing list