From patchwork Mon May 30 14:54:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [10/17] initramfs-module-squashfs: port to new getarg API Date: Mon, 30 May 2011 14:54:16 -0000 From: Otavio Salvador X-Patchwork-Id: 5059 Message-Id: <1306767263-29895-11-git-send-email-otavio@ossystems.com.br> To: openembedded-devel@lists.openembedded.org Cc: Otavio Salvador Signed-off-by: Otavio Salvador --- 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"