Arthur Heymans has uploaded this change for review.

View Change

util/cbmem: Print usage when no arguments are given

Change-Id: Iccbb65ca768a62791af54afd9b7903495bc690af
Signed-off-by: Arthur Heymans <arthur@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 change 27777. To unsubscribe, or for help writing mail filters, visit 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@aheymans.xyz>