Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27778
Change subject: util/ectool: Print usage when no arguments are given ......................................................................
util/ectool: Print usage when no arguments are given
Change-Id: I40dbd2a51d018eb549e9b2fa4365b3e4f9355bff Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/ectool/ectool.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/27778/1
diff --git a/util/ectool/ectool.c b/util/ectool/ectool.c index be5a899..05a893c 100644 --- a/util/ectool/ectool.c +++ b/util/ectool/ectool.c @@ -90,6 +90,11 @@ {0, 0, 0, 0} };
+ if (argv[1] == NULL) { + print_usage(argv[0]); + exit(1); + } + while ((opt = getopt_long(argc, argv, "vh?Vidqpw:z:", long_options, &option_index)) != EOF) { switch (opt) {