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

Function cbfs_copy

util/cbfstool/cbfstool.c:1778–1799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1776}
1777
1778static int cbfs_copy(void)
1779{
1780 struct cbfs_image src_image;
1781 struct buffer src_buf;
1782
1783 if (!param.source_region) {
1784 ERROR("You need to specify -R/--source-region.\n");
1785 return 1;
1786 }
1787
1788 /* Obtain the source region and convert it to a cbfs_image. */
1789 if (!partitioned_file_read_region(&src_buf, param.image_file,
1790 param.source_region)) {
1791 ERROR("Region not found in image: %s\n", param.source_region);
1792 return 1;
1793 }
1794
1795 if (cbfs_image_from_buffer(&src_image, &src_buf, param.headeroffset))
1796 return 1;
1797
1798 return cbfs_copy_instance(&src_image, param.image_region);
1799}
1800
1801static int cbfs_compact(void)
1802{

Callers

nothing calls this directly

Calls 3

cbfs_image_from_bufferFunction · 0.85
cbfs_copy_instanceFunction · 0.85

Tested by

no test coverage detected