[OE-core] [PATCH 2/6] runqemu: add -h and --help

Robert Yang liezhi.yang at windriver.com
Thu Mar 16 10:13:25 UTC 2017


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 at windriver.com>
---
 scripts/runqemu | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index add48e6..d43006f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -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
@@ -1158,7 +1158,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()
-- 
2.9.0




More information about the Openembedded-core mailing list