[PATCH] xen/build: fix xen/tools/binfile

Juergen Gross posted 1 patch 3 years, 10 months ago
Failed in applying to current master (apply log)
xen/tools/binfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] xen/build: fix xen/tools/binfile
Posted by Juergen Gross 3 years, 10 months ago
xen/tools/binfile contains a bash specific command (let). This leads
to build failures on systems not using bash as /bin/sh.

Replace "let SHIFT=$OPTIND-1" by "SHIFT=$((OPTIND-1))".

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 xen/tools/binfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/tools/binfile b/xen/tools/binfile
index df0301183f..23099c49bf 100755
--- a/xen/tools/binfile
+++ b/xen/tools/binfile
@@ -17,7 +17,7 @@ while getopts "ia:" opt; do
         ;;
     esac
 done
-let "SHIFT=$OPTIND-1"
+SHIFT=$((OPTIND-1))
 shift $SHIFT
 
 target=$1
-- 
2.26.2


Re: [PATCH] xen/build: fix xen/tools/binfile
Posted by Andrew Cooper 3 years, 10 months ago
On 29/05/2020 19:28, Juergen Gross wrote:
> xen/tools/binfile contains a bash specific command (let). This leads
> to build failures on systems not using bash as /bin/sh.
>
> Replace "let SHIFT=$OPTIND-1" by "SHIFT=$((OPTIND-1))".
>
> Signed-off-by: Juergen Gross <jgross@suse.com>

A/T-by and pushed.  Thanks for the quick turnaround.

~Andrew