Patchwork [1/1] runqemu: remove core-image-* whitelist

login
register
mail settings
Submitter Scott Garman
Date Dec. 5, 2013, 9:57 p.m.
Message ID <91f2cb9128007933216034298897b5ab34cc90ed.1386279548.git.scott.a.garman@intel.com>
Download mbox | patch
Permalink /patch/62931/
State New
Headers show

Comments

Scott Garman - Dec. 5, 2013, 9:57 p.m.
Using a whitelist for image names to default to when none are
specified on the command line is no longer desired. Instead,
choose the most recently created image filename that conforms
to typical image naming conventions.

Fixes [YOCTO #5617].

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 scripts/runqemu | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 619ffb6..9c0a03b 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -399,18 +399,11 @@  findimage() {
 
     # Sort rootfs candidates by modification time - the most
     # recently created one is the one we most likely want to boot.
-    filenames=`ls -t $where/*-image*$machine.$extension 2>/dev/null | xargs`
-    for name in $filenames; do
-        case $name in
-        *core-image-sato* | \
-        *core-image-lsb* | \
-        *core-image-basic* | \
-        *core-image-minimal* )
-            ROOTFS=$name
-            return
-            ;;
-        esac
-    done
+    filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1`
+    if [ "x$filename" != "x" ]; then
+        ROOTFS=$filename
+        return
+    fi
 
     echo "Couldn't find a $machine rootfs image in $where."
     exit 1