[coreboot-gerrit] Change in coreboot[master]: util/ectool: Print usage when no arguments are given

Arthur Heymans (Code Review) gerrit at coreboot.org
Wed Aug 1 17:25:55 CEST 2018


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 at 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) {

-- 
To view, visit https://review.coreboot.org/27778
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I40dbd2a51d018eb549e9b2fa4365b3e4f9355bff
Gerrit-Change-Number: 27778
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180801/086c818d/attachment.html>


More information about the coreboot-gerrit mailing list