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

Function parse_region

util/cbfstool/cse_serger.c:823–839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821}
822
823static int parse_region(struct region *r, char *arg)
824{
825 char *tok;
826
827 tok = strtok(arg, ":");
828 unsigned long offset = strtoul(tok, NULL, 0);
829
830 tok = strtok(NULL, ":");
831 unsigned long size = strtoul(tok, NULL, 0);
832
833 if (region_create_untrusted(r, offset, size) != CB_SUCCESS) {
834 ERROR("Invalid region: %lx:%lx\n", offset, size);
835 return -1;
836 }
837
838 return 0;
839}
840
841static struct command {
842 const char *name;

Callers 1

mainFunction · 0.85

Calls 3

region_create_untrustedFunction · 0.85
strtokFunction · 0.50
strtoulFunction · 0.50

Tested by

no test coverage detected