cbfstool reacts to a too large bootblock file by stopping
authorPatrick Georgi <patrick.georgi@coresystems.de>
Mon, 1 Jun 2009 20:02:21 +0000 (20:02 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Mon, 1 Jun 2009 20:02:21 +0000 (20:02 +0000)
with an error code now.

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4329 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/cbfstool/util.c

index f0c0b293cfe8a2c224f17791726adaaaeace9cb4..f77b74634b2f4fe6b16e4c341e4a40de618b2d9f 100644 (file)
@@ -222,7 +222,8 @@ int create_rom(struct rom *rom, const unsigned char *filename,
        rom->header->align = htonl(align);
        rom->header->offset = htonl(0);
 
-       add_bootblock(rom, bootblockname);
+       if (add_bootblock(rom, bootblockname) == -1)
+               return -1;
 
        /* Write the cbfs master header address at the end of the ROM. */