[coreboot] [commit] r5004 - trunk/util/cbfstool
svn at coreboot.org
svn at coreboot.org
Thu Jan 7 22:37:18 CET 2010
Author: oxygene
Date: 2010-01-07 22:37:18 +0100 (Thu, 07 Jan 2010)
New Revision: 5004
Modified:
trunk/util/cbfstool/common.c
Log:
Print (empty) instead of nothing at all for empty
filename entries (particularily "null" files)
Signed-off-by: Maciej Pijanka <maciej.pijanka at gmail.com>
Acked-by: Patrick Georgi <patrick.georgi at coresystems.de>
Modified: trunk/util/cbfstool/common.c
===================================================================
--- trunk/util/cbfstool/common.c 2010-01-06 17:05:37 UTC (rev 5003)
+++ trunk/util/cbfstool/common.c 2010-01-07 21:37:18 UTC (rev 5004)
@@ -165,9 +165,11 @@
struct cbfs_file *thisfile =
(struct cbfs_file *)phys_to_virt(current);
uint32_t length = ntohl(thisfile->len);
- printf("%-30s 0x%-8x %-12s %d\n",
- (const char *)(phys_to_virt(current) +
- sizeof(struct cbfs_file)),
+ char *fname = (char *)(phys_to_virt(current) + sizeof(struct cbfs_file));
+ if (strlen(fname) == 0)
+ fname = "(empty)";
+
+ printf("%-30s 0x%-8x %-12s %d\n", fname,
current - phys_start, strfiletype(ntohl(thisfile->type)),
length);
current =
More information about the coreboot
mailing list