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

Function fmap_size

util/cbfstool/flashmap/fmap.c:31–37  ·  view source on GitHub ↗

returns size of fmap data structure if successful, <0 to indicate error */

Source from the content-addressed store, hash-verified

29
30/* returns size of fmap data structure if successful, <0 to indicate error */
31int fmap_size(const struct fmap *fmap)
32{
33 if (!fmap)
34 return -1;
35
36 return sizeof(*fmap) + (le16toh(fmap->nareas) * sizeof(struct fmap_area));
37}
38
39/* Make a best-effort assessment if the given fmap is real */
40static int is_valid_fmap(const struct fmap *fmap)

Callers 9

maybe_update_fmap_hashFunction · 0.85
fmap_size_testFunction · 0.85
fmap_find_testFunction · 0.85
mainFunction · 0.85
partitioned_file_createFunction · 0.85
partitioned_file_reopenFunction · 0.85
fmap_lsearchFunction · 0.85
fmap_bsearchFunction · 0.85
fmap_append_areaFunction · 0.85

Calls

no outgoing calls

Tested by 2

fmap_size_testFunction · 0.68
fmap_find_testFunction · 0.68