From b534e4256570ab100456837898c81aa581deeb09 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 8 May 2009 20:07:00 +0000 Subject: [PATCH] Trivial clean up of print usage and parameter checking. Signed-off-by: Myles Watson Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4263 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/cbfstool/print.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/cbfstool/print.c b/util/cbfstool/print.c index b23f949e06..234fefb423 100644 --- a/util/cbfstool/print.c +++ b/util/cbfstool/print.c @@ -27,8 +27,11 @@ void print_usage(void) int print_handler(struct rom *rom, int argc, char **argv) { - if (argc > 0 || argv[1] != NULL) - printf("print\t\t\t\tShow the contents of the ROM\n"); + if ( argc > 0 ) { + ERROR("print %s? print takes no arguments.\n", argv[0]); + print_usage(); + return -1; + } printf("%s: %d kB, bootblocksize %d, romsize %d, offset 0x%x\n", rom->name, rom->size / 1024, ntohl(rom->header->bootblocksize), ntohl(rom->header->romsize), ntohl(rom->header->offset));