summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 000d93a160..305e46aebf 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -91,10 +91,9 @@ process_filename() {
91# Parse command line args without requiring specific ordering. It's a 91# Parse command line args without requiring specific ordering. It's a
92# bit more complex, but offers a great user experience. 92# bit more complex, but offers a great user experience.
93KVM_ENABLED="no" 93KVM_ENABLED="no"
94i=1 94while true; do
95while [ $i -le $# ]; do 95 arg=${1}
96 arg=${!i} 96 case "$arg" in
97 case $arg in
98 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemuppc") 97 "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemuppc")
99 [ -z "$MACHINE" ] && MACHINE=$arg || \ 98 [ -z "$MACHINE" ] && MACHINE=$arg || \
100 error "conflicting MACHINE types [$MACHINE] and [$arg]" 99 error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -152,6 +151,7 @@ while [ $i -le $# ]; do
152 KVM_ENABLED="yes" 151 KVM_ENABLED="yes"
153 KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1` 152 KVM_CAPABLE=`grep -q 'vmx\|smx' /proc/cpuinfo && echo 1`
154 ;; 153 ;;
154 "") break ;;
155 *) 155 *)
156 # A directory name is an nfs rootfs 156 # A directory name is an nfs rootfs
157 if [ -d "$arg" ]; then 157 if [ -d "$arg" ]; then
@@ -174,7 +174,7 @@ while [ $i -le $# ]; do
174 fi 174 fi
175 ;; 175 ;;
176 esac 176 esac
177 i=$((i + 1)) 177 shift
178done 178done
179 179
180if [ ! -c /dev/net/tun ] ; then 180if [ ! -c /dev/net/tun ] ; then
@@ -391,6 +391,9 @@ if [ "$libgl" != 'yes' ]; then
391 exit 1; 391 exit 1;
392fi 392fi
393 393
394INTERNAL_SCRIPT="$0-internal"
395if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
394INTERNAL_SCRIPT=`which runqemu-internal` 396INTERNAL_SCRIPT=`which runqemu-internal`
397fi
395 398
396. $INTERNAL_SCRIPT 399. $INTERNAL_SCRIPT