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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user