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

Function cmd_create_bpdt

util/cbfstool/cse_serger.c:742–765  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742static int cmd_create_bpdt(void)
743{
744 struct buffer buff;
745 struct buffer wbuff;
746
747 if (allocate_buffer(&buff, &wbuff, "BPDT header"))
748 return -1;
749
750 ifwi.bpdt_hdr = ifwi.bpdt_ops->create_hdr();
751 if (!ifwi.bpdt_hdr) {
752 ERROR("Failed to create BPDT header!\n");
753 return -1;
754 }
755
756 ifwi.bpdt_ops->update_checksum(ifwi.bpdt_hdr, NULL);
757
758 if (ifwi.bpdt_ops->write_hdr(&wbuff, ifwi.bpdt_hdr)) {
759 ERROR("Failed to write BPDT header!\n");
760 return -1;
761 }
762
763 buffer_write_file(&buff, params.image_name);
764 return 0;
765}
766
767static int cmd_add(void)
768{

Callers

nothing calls this directly

Calls 2

allocate_bufferFunction · 0.85
buffer_write_fileFunction · 0.85

Tested by

no test coverage detected