summaryrefslogtreecommitdiff
path: root/util/cbfstool/print.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-05-08 19:39:15 +0000
committerMyles Watson <mylesgw@gmail.com>2009-05-08 19:39:15 +0000
commit475aeda9d6d62d0249276bff657adc67d206ff31 (patch)
tree6b3d9371ce61197417ed308faca8cc36691ac58e /util/cbfstool/print.c
parent83b8f0c48550bb1b2cb1a6610b1f0010bf8533a4 (diff)
downloadcoreboot-475aeda9d6d62d0249276bff657adc67d206ff31.tar.xz
Add -Werror to help us keep the code clean.
Change sizes from unsigned int to int. Clean up some usage and parameter checking. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4262 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/cbfstool/print.c')
-rw-r--r--util/cbfstool/print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/cbfstool/print.c b/util/cbfstool/print.c
index 7eb9ee452c..b23f949e06 100644
--- a/util/cbfstool/print.c
+++ b/util/cbfstool/print.c
@@ -27,6 +27,9 @@ 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");
+
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));
printf("Alignment: %d bytes\n\n", ntohl(rom->header->align));
@@ -48,6 +51,9 @@ int print_handler(struct rom *rom, int argc, char **argv)
case CBFS_COMPONENT_OPTIONROM:
strcpy(type, "optionrom");
break;
+ case CBFS_COMPONENT_NULL:
+ strcpy(type, "free");
+ break;
default:
sprintf(type, "0x%8.8x", htonl(c->type));
break;