run: fix extra emulator args that were broken by -X

This commit is contained in:
Ciro Santilli
2018-06-27 17:58:54 +01:00
parent 1721f184d6
commit 20b9961233

2
run
View File

@@ -140,6 +140,7 @@ done
shift "$(($OPTIND - 1))" shift "$(($OPTIND - 1))"
extra_flags="$extra_flags $@" extra_flags="$extra_flags $@"
OPTIND=1 OPTIND=1
if [ -n "$extra_opts" ]; then
while getopts b OPT $extra_opts; do while getopts b OPT $extra_opts; do
case "$OPT" in case "$OPT" in
b) b)
@@ -150,6 +151,7 @@ while getopts b OPT $extra_opts; do
;; ;;
esac esac
done done
fi
set_common_vars -L "$common_linux_variant" -M "$common_gem5_variant" -n "$common_run_id" "$arch" "$gem5" set_common_vars -L "$common_linux_variant" -M "$common_gem5_variant" -n "$common_run_id" "$arch" "$gem5"
if "$debug" && "$kvm"; then if "$debug" && "$kvm"; then
echo 'error: -d and -K are incompatible' 1>&2 echo 'error: -d and -K are incompatible' 1>&2