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 maciej.pijanka@gmail.com
Am 06.01.2010 17:20, schrieb Maciej Pijanka:
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 maciej.pijanka@gmail.com
+ 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)),
I don't quite like the duplication that's going on here.. how about
if (strlen(fname) == 0) fname = "(empty)"; printf("...", fname, ...);
instead? That way, when we feel the need to change that string, we only have to change it once.
Patrick
On Wed, 06 Jan 2010, Patrick Georgi wrote:
Am 06.01.2010 17:20, schrieb Maciej Pijanka:
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 maciej.pijanka@gmail.com
if (strlen(fname) == 0)
printf("%-30s 0x%-8x %-12s %d\n", "(empty)",
current - phys_start, strfiletype(ntohl(thisfile->type)),
length);
printf("%-30s 0x%-8x %-12s %d\n", (const char *)(phys_to_virt(current) + sizeof(struct cbfs_file)),else
I don't quite like the duplication that's going on here.. how about
if (strlen(fname) == 0) fname = "(empty)"; printf("...", fname, ...);
instead? That way, when we feel the need to change that string, we only have to change it once.
right sounds much better, see changed version.