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

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


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27777


Change subject: util/cbmem: Print usage when no arguments are given
......................................................................

util/cbmem: Print usage when no arguments are given

Change-Id: Iccbb65ca768a62791af54afd9b7903495bc690af
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M util/cbmem/cbmem.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/27777/1

diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index 3435c4c..f567ffe 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -1268,6 +1268,10 @@
 		{"help", 0, 0, 'h'},
 		{0, 0, 0, 0}
 	};
+
+	if (argv[1] == NULL)
+		print_usage(argv[0], 1);
+
 	while ((opt = getopt_long(argc, argv, "c1CltTLxVvh?r:",
 				  long_options, &option_index)) != EOF) {
 		switch (opt) {

-- 
To view, visit https://review.coreboot.org/27777
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: Iccbb65ca768a62791af54afd9b7903495bc690af
Gerrit-Change-Number: 27777
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/4c93c296/attachment.html>


More information about the coreboot-gerrit mailing list