MCPcopy Create free account
hub / github.com/coreboot/coreboot / print_subpart_dir

Function print_subpart_dir

util/cbfstool/ifwitool.c:434–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432
433
434static void print_subpart_dir(struct subpart_dir *s)
435{
436 if (verbose == 0)
437 return;
438
439 size_t i;
440
441 printf("%-25s 0x%-23.8x\n", "Marker", s->h.marker);
442 printf("%-25s %-25d\n", "Num entries", s->h.num_entries);
443 printf("%-25s %-25d\n", "Header Version", s->h.header_version);
444 printf("%-25s %-25d\n", "Entry Version", s->h.entry_version);
445 printf("%-25s 0x%-23x\n", "Header Length", s->h.header_length);
446 printf("%-25s 0x%-23x\n", "Checksum", s->h.checksum);
447 printf("%-25s ", "Name");
448 for (i = 0; i < sizeof(s->h.name); i++)
449 printf("%c", s->h.name[i]);
450
451 printf("\n");
452
453 printf("%-25s%-25s%-25s%-25s%-25s\n", "Entry #", "Name", "Offset",
454 "Length", "Rsvd");
455
456 printf("=============================================================="
457 "===========================================================\n");
458
459 for (i = 0; i < s->h.num_entries; i++) {
460 printf("%-25zd%-25.12s0x%-23x0x%-23x0x%-23x\n", i+1,
461 s->e[i].name, s->e[i].offset, s->e[i].length,
462 s->e[i].rsvd);
463 }
464
465 printf("=============================================================="
466 "===========================================================\n");
467}
468
469static void bpdt_print_header(struct bpdt_header *h, const char *name)
470{

Callers 2

parse_subpart_dirFunction · 0.85
create_subpartFunction · 0.85

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected