aboutsummaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorGravatar Gaël PORTAY <gael.portay@savoirfairelinux.com>2016-11-21 11:15:29 -0500
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-11-21 21:16:02 +0100
commitfe13efe19dde41409a72d625919807f3841767fd (patch)
tree58c6165ae67f44db43a2229f246381af8adcc679 /fs/ext2
parent4f5f48199116119a2b69c42b95cee0594eee8774 (diff)
downloadbuildroot-fe13efe19dde41409a72d625919807f3841767fd.tar.gz
buildroot-fe13efe19dde41409a72d625919807f3841767fd.tar.bz2
fs/ext2: fix double quoted label
Since the commit 6dd7bbb59134799ed3d7343f238b3b02592faebf, the label does not need anymore to be quoted. Even worse it *must* not be simple-quoted, unless the label will contain the double-quotes from the config variable BR2_TARGET_ROOTFS_EXT2_LABEL. The commit mentionned above has replaced echo by printf: - echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT) + $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT) Since this commit the rootfs label contains extra double-quotes. $ blkid /dev/mmcblk0: LABEL=""BR 2016.08"" UUID="xxx" ^ ^ With this fix, the extra double-quotes have disappeared: /dev/mmcblk0: LABEL="BR 2016.11-rc2" UUID="yyy" Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/ext2.mk11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 7417f81cf0..cfb34c4565 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -20,12 +20,11 @@ ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0)
EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)
endif
-# Not qstrip-ing the variable, because it may contain spaces, but we must
-# qstrip it when checking. Furthermore, we need to further quote it, so
-# that the quotes do not get eaten by the echo statement when creating the
-# fakeroot script
-ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),)
-EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)'
+# qstrip results in stripping consecutive spaces into a single one. So the
+# variable is not qstrip-ed to preserve the integrity of the string value.
+EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
+ifneq ($(EXT2_LABEL),)
+EXT2_OPTS += -l "$(EXT2_LABEL)"
endif
ROOTFS_EXT2_DEPENDENCIES = host-mke2img