All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] fs/ext2: fix double quoted label
Date: Wed, 16 Nov 2016 23:58:23 +0100	[thread overview]
Message-ID: <e96fb5e7-1604-fb57-93c3-6aa38fefb683@mind.be> (raw)
In-Reply-To: <20161116195543.6456-2-gael.portay@savoirfairelinux.com>



On 16-11-16 20:55, Ga?l PORTAY wrote:
> 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.
> 
> Signed-off-by: Ga?l PORTAY <gael.portay@savoirfairelinux.com>
> ---
>  fs/ext2/ext2.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
> index 7417f81..49b44e4 100644
> --- a/fs/ext2/ext2.mk
> +++ b/fs/ext2/ext2.mk
> @@ -20,12 +20,8 @@ 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)'
> +EXT2_OPTS += -l $(BR2_TARGET_ROOTFS_EXT2_LABEL)

 We usually don't rely on the quotes added by Kconfig, because it's possible
that the variable is overridden on the command line like
make BR2_TARGET_ROOTFS_EXT2_LABEL="foo bar"

So it should be
EXT2_OPTS += -l '$(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL))'

 Regards,
 Arnout

>  endif
>  
>  ROOTFS_EXT2_DEPENDENCIES = host-mke2img
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2016-11-16 22:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 19:55 [Buildroot] [PATCH] fs/ext2: fix double quoted label Gaël PORTAY
2016-11-16 19:55 ` Gaël PORTAY
2016-11-16 22:58   ` Arnout Vandecappelle [this message]
2016-11-17 17:48     ` Gaël PORTAY
2016-11-21 16:15 Gaël PORTAY
2016-11-21 20:15 ` Thomas Petazzoni
2016-11-21 20:23   ` Gaël PORTAY

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e96fb5e7-1604-fb57-93c3-6aa38fefb683@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.