Skip to content

Commit 20b9961

Browse files
committed
run: fix extra emulator args that were broken by -X
1 parent 1721f18 commit 20b9961

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

run

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,18 @@ done
140140
shift "$(($OPTIND - 1))"
141141
extra_flags="$extra_flags $@"
142142
OPTIND=1
143-
while getopts b OPT $extra_opts; do
144-
case "$OPT" in
145-
b)
146-
gem5_fsbiglittle=true
147-
;;
148-
?)
149-
exit 2
150-
;;
151-
esac
152-
done
143+
if [ -n "$extra_opts" ]; then
144+
while getopts b OPT $extra_opts; do
145+
case "$OPT" in
146+
b)
147+
gem5_fsbiglittle=true
148+
;;
149+
?)
150+
exit 2
151+
;;
152+
esac
153+
done
154+
fi
153155
set_common_vars -L "$common_linux_variant" -M "$common_gem5_variant" -n "$common_run_id" "$arch" "$gem5"
154156
if "$debug" && "$kvm"; then
155157
echo 'error: -d and -K are incompatible' 1>&2

0 commit comments

Comments
 (0)