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 <[email protected]>
Acked-by: Patrick Georgi <[email protected]>


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 =


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to