]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: run without arguments
authorRobert Yang <liezhi.yang@windriver.com>
Tue, 11 Apr 2017 09:21:27 +0000 (02:21 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Apr 2017 17:10:49 +0000 (18:10 +0100)
Since we can get MACHINE and others from env vars and "bitbake -e",
"runqemu" can work without any arguments.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 6234e811a7ba435a95bde57d0044efe7b2193c5b..51ed9de22c9f5b5f48af04642259b8a8e0b80023 100755 (executable)
@@ -83,6 +83,7 @@ of the following environment variables (in any order):
   help, -h, --help: print this text
 
 Examples:
+  runqemu
   runqemu qemuarm
   runqemu tmp/deploy/images/qemuarm
   runqemu tmp/deploy/images/qemux86/<qemuboot.conf>
@@ -1184,8 +1185,7 @@ class BaseConfig(object):
             logger.warn("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8'))
 
 def main():
-    if len(sys.argv) == 1 or "help" in sys.argv or \
-            '-h' in sys.argv or '--help' in sys.argv:
+    if "help" in sys.argv or '-h' in sys.argv or '--help' in sys.argv:
         print_usage()
         return 0
     config = BaseConfig()