summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-09-09 17:12:05 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:47:22 +0100
commit29e0aaa7345ca823bb4af2d4a870e98ac75e04e7 (patch)
tree8b78c276c8d7fa375315046b8c2f28f8cd242339
parentfae697dedf6ab04b7c123ea5615b1003a79c2422 (diff)
downloadopenembedded-core-contrib-29e0aaa7345ca823bb4af2d4a870e98ac75e04e7.tar.gz
openembedded-core-contrib-29e0aaa7345ca823bb4af2d4a870e98ac75e04e7.tar.bz2
openembedded-core-contrib-29e0aaa7345ca823bb4af2d4a870e98ac75e04e7.zip
runqemu: avoid image file name mismatches
Giving anything with -image in it as bootparams or in qemuparams (for example, an additional -drive parameter with an image file or an "-initrd .../core-image-minimal-initramfs-qemux86.cpio.gz") caused runqemu to treat these parameters as names of the rootfs image file. Matching *-image) after checking the current argument for more specific cases like bootparams and qemuparams avoids this misinterpretation of the command line parameters. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rwxr-xr-xscripts/runqemu32
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index f16af9ccf4..23cf5be169 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -118,22 +118,6 @@ while true; do
[ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \
error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
;;
- *-image*)
- [ -z "$ROOTFS" ] || \
- error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
- if [ -f "$arg" ]; then
- process_filename $arg
- elif [ -d "$arg" ]; then
- # Handle the case where the nfsroot dir has -image-
- # in the pathname
- echo "Assuming $arg is an nfs rootfs"
- FSTYPE=nfs
- ROOTFS=$arg
- else
- ROOTFS=$arg
- LAZY_ROOTFS="true"
- fi
- ;;
"ramfs")
FSTYPE=cpio.gz
RAMFS=true
@@ -192,6 +176,22 @@ while true; do
"publicvnc")
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
;;
+ *-image*)
+ [ -z "$ROOTFS" ] || \
+ error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
+ if [ -f "$arg" ]; then
+ process_filename $arg
+ elif [ -d "$arg" ]; then
+ # Handle the case where the nfsroot dir has -image-
+ # in the pathname
+ echo "Assuming $arg is an nfs rootfs"
+ FSTYPE=nfs
+ ROOTFS=$arg
+ else
+ ROOTFS=$arg
+ LAZY_ROOTFS="true"
+ fi
+ ;;
"") break ;;
*)
# A directory name is an nfs rootfs