commit | 3db99f2e0add6bac96bf0ce83e640f9f6fa11fad | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Thu May 11 16:21:46 2017 -0700 |
committer | Steven Moreland <smoreland@google.com> | Fri May 12 12:36:04 2017 -0700 |
tree | cef30a30534f1b830090269296a6456434053906 | |
parent | edc2212c5beabc636e2e299adcf025d2f4f1f93d [diff] |
hidl-gen: fix help menu output should print help menu if just `hidl-gen` is run Test: manual Change-Id: I8dfcade8a205fb832299c81ee3b7df88b35c2b6d
diff --git a/main.cpp b/main.cpp index cbd0708..e7c308a 100644 --- a/main.cpp +++ b/main.cpp
@@ -1286,6 +1286,11 @@ const char *me = argv[0]; OutputHandler *outputFormat = nullptr; + if (argc == 1) { + usage(me); + exit(1); + } + int res; while ((res = getopt(argc, argv, "hp:o:r:L:")) >= 0) { switch (res) {