qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portab


From: Kamil Rytarowski
Subject: Re: [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue
Date: Tue, 25 Apr 2017 15:50:46 +0200
User-agent: Mozilla/5.0 (X11; NetBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

On 25.04.2017 15:33, Peter Maydell wrote:
> On 25 April 2017 at 14:18, Kamil Rytarowski <address@hidden> wrote:
>> Appease pkgsrc and use portable shell variable comparison.
>> This switches "==" to "=". It should not be a functional change.
>>
>> Signed-off-by: Kamil Rytarowski <address@hidden>
>> ---
> 
> 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.
> 

I assumed that qemu-trivial@ don't need to go to address@hidden Thank you
for pointing it out.

>>  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 <address@hidden>
> 
> thanks
> -- PMM
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]