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

Function cmd_print_layout

util/cbfstool/cse_serger.c:590–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590static int cmd_print_layout(void)
591{
592 if (params.version_str == NULL) {
593 ERROR("No version provided!\n");
594 return -1;
595 }
596
597 const struct bpdt_ops *ops = get_bpdt_ops(NULL);
598 if (!ops) {
599 ERROR("No matching bpdt_ops!\n");
600 return -1;
601 }
602
603 struct buffer buff;
604 if (buffer_from_file(&buff, params.image_name)) {
605 ERROR("Failed to read input file %s\n", params.image_name);
606 return -1;
607 }
608
609 ifwi.cse_layout = ops->read_layout(&buff);
610 if (!ifwi.cse_layout) {
611 ERROR("Failed to read CSE layout!\n");
612 return -1;
613 }
614
615 ops->print_layout(ifwi.cse_layout);
616
617 return 0;
618}
619
620static int allocate_buffer(struct buffer *buff, struct buffer *wbuff, const char *str)
621{

Callers

nothing calls this directly

Calls 2

get_bpdt_opsFunction · 0.85
buffer_from_fileFunction · 0.85

Tested by

no test coverage detected