Hello

I know that all experienced corebooters knew well that null mean empty space
but that was't obvious for me when i tried first time compile coreboot.

Patch in attachment.

Signed-off by: Maciej Pijanka <[email protected]>

-- 
Maciej Pijanka
reg. Linux user #133161
Index: util/cbfstool/common.c
===================================================================
--- util/cbfstool/common.c	(revision 5001)
+++ util/cbfstool/common.c	(working copy)
@@ -165,6 +165,13 @@
 		struct cbfs_file *thisfile =
 		    (struct cbfs_file *)phys_to_virt(current);
 		uint32_t length = ntohl(thisfile->len);
+		const char *fname = (const char *)(phys_to_virt(current) + sizeof(struct cbfs_file));
+		if (strlen(fname) == 0) 
+		printf("%-30s 0x%-8x %-12s %d\n", "(empty)",
+		       current - phys_start, strfiletype(ntohl(thisfile->type)),
+		       length);
+		
+		else 
 		printf("%-30s 0x%-8x %-12s %d\n",
 		       (const char *)(phys_to_virt(current) +
 				      sizeof(struct cbfs_file)),
-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to