scripts/qemu-binfmt-conf.sh: Fix shell portability issue
Quoted 5 lines · Kamil Rytarowski
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
Signed-off-by Kamil Rytarowski <[email protected]>---
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.
Quoted 23 lines
scripts/qemu-binfmt-conf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/qemu-binfmt-conf.sh +2
-3@@ -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 --
Quoted 1 line
2.12.2
thanks
-- PMM
Quoted 4 lines · Peter Maydell
Quoted 3 lines · Kamil Rytarowski
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Kamil Rytarowski <[email protected]>---
Thanks for this patch; it's an easy bug to let slip in if your
/bin/shhappens to be bash.PS: you forgot to cc qemu-devel@ on this patch.
I assumed that qemu-trivial@ don't need to go to qemu-devel@. Thank you for pointing it out.
Quoted 30 lines
Quoted 23 lines
scripts/qemu-binfmt-conf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/qemu-binfmt-conf.sh +2
-3@@ -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 --Quoted 1 line
2.12.2
Reviewed-by Peter Maydell <[email protected]>thanks
-- PMM
Quoted 8 lines · Kamil Rytarowski
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Kamil Rytarowski
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
Signed-off-by Kamil Rytarowski <[email protected]>---
Quoted 8 lines
Quoted 5 lines
Thanks for this patch; it's an easy bug to let slip in if your
/bin/shhappens to be bash.PS: you forgot to cc qemu-devel@ on this patch.
I assumed that qemu-trivial@ don't need to go to qemu-devel@. Thank you for pointing it out.
ALL patches need to go to qemu-devel (so we have a one-stop-shop for all pending patches), but some patches need to additionally go to secondary lists for catching the attention of the right maintainers.
scripts/get_maintainer.pl is your friend, and it should always list qemu-devel in its answer.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Laurent Vivier
Reviewed-byQuoted 29 lines · Peter Maydell
Quoted 5 lines · Kamil Rytarowski
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
Signed-off-by Kamil Rytarowski <[email protected]>---
Thanks for this patch; it's an easy bug to let slip in if your
/bin/shhappens to be bash.PS: you forgot to cc qemu-devel@ on this patch.
Quoted 17 lines
scripts/qemu-binfmt-conf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/qemu-binfmt-conf.sh +1
-1@@ -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
Quoted 9 lines
Quoted 7 lines
scripts/qemu-binfmt-conf.sh +1
-2- 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 <[email protected]>
PATCH 1/1 scripts/qemu-binfmt-conf.sh: Fix shell portability issue
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
--- scripts/qemu-binfmt-conf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/qemu-binfmt-conf.sh +2 -2
@@ -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
Signature · 1 line
2.12.2
Michael Tokarev
AppliedQuoted 2 lines · Kamil Rytarowski
Appease pkgsrc and use portable shell variable comparison. This switches "==" to "=". It should not be a functional change.
Applied to -trivial, thanks!
/mjt
Quoted 25 lines
Signed-off-by Kamil Rytarowski <[email protected]>--- scripts/qemu-binfmt-conf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)scripts/qemu-binfmt-conf.sh +2
-2@@ -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