]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: add -h and --help
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 16 Mar 2017 10:13:25 +0000 (03:13 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Mar 2017 22:11:15 +0000 (22:11 +0000)
Fixed:
$ runqemu -h
runqemu - INFO - Assuming MACHINE = -h
runqemu - INFO - Running MACHINE=-h bitbake -e...
[snip]
Exception: FSTYPE is NULL!

[YOCTO #10941]

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

index cfdb0c53fbbac7ea4fdea95b28bbe3891a2d0f2b..17219563a80773e76a490855161a1f8cb5ff5094 100755 (executable)
@@ -80,7 +80,7 @@ of the following environment variables (in any order):
   biosfilename=<filename> - specify bios filename
   qemuparams=<xyz> - specify custom parameters to QEMU
   bootparams=<xyz> - specify custom kernel parameters during boot
-  help: print this text
+  help, -h, --help: print this text
 
 Examples:
   runqemu qemuarm
@@ -1161,7 +1161,8 @@ 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:
+    if len(sys.argv) == 1 or "help" in sys.argv or \
+            '-h' in sys.argv or '--help' in sys.argv:
         print_usage()
         return 0
     config = BaseConfig()