Patchwork image_types: minor, inline CPIO_TOUCH_INIT()

login
register
mail settings
Submitter Matthieu CRAPET
Date Feb. 17, 2014, 4:28 p.m.
Message ID <1392654538-842-1-git-send-email-Matthieu.Crapet@ingenico.com>
Download mbox | patch
Permalink /patch/66855/
State New
Headers show

Comments

Matthieu CRAPET - Feb. 17, 2014, 4:28 p.m.
Since generic compression solution has been introduced
(see revision b7e4ed41ee480f00b7265341e9e2d2c2b9135143),
CPIO_TOUCH_INIT() is only called by IMAGE_CMD_cpio.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
---
 meta/classes/image_types.bbclass | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Patch

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 0467abd..27b0796 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -66,14 +66,10 @@  IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAM
 IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
 IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
 
-CPIO_TOUCH_INIT () {
-	if [ ! -L ${IMAGE_ROOTFS}/init ]
-	then
-	touch ${IMAGE_ROOTFS}/init
-	fi
-}
 IMAGE_CMD_cpio () {
-	${CPIO_TOUCH_INIT}
+	if [ ! -L ${IMAGE_ROOTFS}/init ]; then
+		touch ${IMAGE_ROOTFS}/init
+	fi
 	cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
 }