Received: from eggs.gnu.org ([2001:4830:134:3::10]:59625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d31RN-00074n-9r for qemu-devel@nongnu.org; Tue, 25 Apr 2017 10:27:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d31RK-0002wd-68 for qemu-devel@nongnu.org; Tue, 25 Apr 2017 10:27:41 -0400 References: <20170425131828.22480-1-n54@gmx.com> From: Laurent Vivier Message-ID: Date: Tue, 25 Apr 2017 16:27:34 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] scripts/qemu-binfmt-conf.sh: Fix shell portability issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Kamil Rytarowski Cc: QEMU Trivial , QEMU Developers On 25/04/2017 15:33, Peter Maydell wrote: > On 25 April 2017 at 14:18, Kamil Rytarowski wrote: >> Appease pkgsrc and use portable shell variable comparison. >> This switches "==" to "=". It should not be a functional change. >> >> Signed-off-by: Kamil Rytarowski >> --- > > 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 Reviewed-by: Laurent Vivier