qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Kamil Rytarowski <n54@gmx.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue
Date: Tue, 25 Apr 2017 16:27:34 +0200	[thread overview]
Message-ID: <f2327f24-0503-4a45-e361-9f18ff00bc22@redhat.com> (raw)
In-Reply-To: <CAFEAcA-PmbjRYb2EDDp60pKNnUQ8Rkdx79TTLgUMf_VRe2JT+w@mail.gmail.com>

On 25/04/2017 15:33, Peter Maydell wrote:
> On 25 April 2017 at 14:18, Kamil Rytarowski <n54@gmx.com> wrote:
>> Appease pkgsrc and use portable shell variable comparison.
>> This switches "==" to "=". It should not be a functional change.
>>
>> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
>> ---
> 
> Thanks for this patch; it's an easy bug to let slip in
> if your /bin/sh happens to be bash.
> 
> PS: you forgot to cc qemu-devel@ on this patch.
> 
>>  scripts/qemu-binfmt-conf.sh | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
>> index 0f1aa63872..8afc3eb5bb 100755
>> --- a/scripts/qemu-binfmt-conf.sh
>> +++ b/scripts/qemu-binfmt-conf.sh
>> @@ -284,12 +284,12 @@ while true ; do
>>          shift
>>          # check given cpu is in the supported CPU list
>>          for cpu in ${qemu_target_list} ; do
>> -            if [ "$cpu" == "$1" ] ; then
>> +            if [ "$cpu" = "$1" ] ; then
>>                  break
>>              fi
>>          done
>>
>> -        if [ "$cpu" == "$1" ] ; then
>> +        if [ "$cpu" = "$1" ] ; then
>>              qemu_target_list="$1"
>>          else
>>              echo "ERROR: unknown CPU \"$1\"" 1>&2
>> --
>> 2.12.2
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

  parent reply	other threads:[~2017-04-25 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170425131828.22480-1-n54@gmx.com>
2017-04-25 13:33 ` [Qemu-devel] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue Peter Maydell
2017-04-25 13:50   ` [Qemu-devel] [Qemu-trivial] " Kamil Rytarowski
2017-04-25 13:54     ` Eric Blake
2017-04-25 14:27   ` Laurent Vivier [this message]
2017-05-05  6:14 ` [Qemu-devel] " Michael Tokarev

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=f2327f24-0503-4a45-e361-9f18ff00bc22@redhat.com \
    --to=lvivier@redhat.com \
    --cc=n54@gmx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).