From 20b99612339c6c54dd6ac841dfd72c832ab9a23b Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Wed, 27 Jun 2018 17:58:54 +0100 Subject: [PATCH] run: fix extra emulator args that were broken by -X --- run | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/run b/run index af70be4..1eb05d5 100755 --- a/run +++ b/run @@ -140,16 +140,18 @@ done shift "$(($OPTIND - 1))" extra_flags="$extra_flags $@" OPTIND=1 -while getopts b OPT $extra_opts; do - case "$OPT" in - b) - gem5_fsbiglittle=true - ;; - ?) - exit 2 - ;; - esac -done +if [ -n "$extra_opts" ]; then + while getopts b OPT $extra_opts; do + case "$OPT" in + b) + gem5_fsbiglittle=true + ;; + ?) + exit 2 + ;; + esac + done +fi set_common_vars -L "$common_linux_variant" -M "$common_gem5_variant" -n "$common_run_id" "$arch" "$gem5" if "$debug" && "$kvm"; then echo 'error: -d and -K are incompatible' 1>&2