Print (empty) instead of nothing at all for empty
filename entries (particularily "null" files) Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5004 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
7250d9d00e
commit
f44eb7876b
|
@ -165,9 +165,11 @@ void print_cbfs_directory(const char *filename)
|
||||||
struct cbfs_file *thisfile =
|
struct cbfs_file *thisfile =
|
||||||
(struct cbfs_file *)phys_to_virt(current);
|
(struct cbfs_file *)phys_to_virt(current);
|
||||||
uint32_t length = ntohl(thisfile->len);
|
uint32_t length = ntohl(thisfile->len);
|
||||||
printf("%-30s 0x%-8x %-12s %d\n",
|
char *fname = (char *)(phys_to_virt(current) + sizeof(struct cbfs_file));
|
||||||
(const char *)(phys_to_virt(current) +
|
if (strlen(fname) == 0)
|
||||||
sizeof(struct cbfs_file)),
|
fname = "(empty)";
|
||||||
|
|
||||||
|
printf("%-30s 0x%-8x %-12s %d\n", fname,
|
||||||
current - phys_start, strfiletype(ntohl(thisfile->type)),
|
current - phys_start, strfiletype(ntohl(thisfile->type)),
|
||||||
length);
|
length);
|
||||||
current =
|
current =
|
||||||
|
|
Loading…
Reference in New Issue