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

Function open_process_config

util/amdfwtool/amdfwtool.c:1671–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1669}
1670
1671static int open_process_config(char *config, amd_cb_config *cb_config)
1672{
1673 FILE *config_handle;
1674
1675 config_handle = fopen(config, "r");
1676 if (config_handle == NULL) {
1677 fprintf(stderr, "Can not open file %s for reading: %s\n",
1678 config, strerror(errno));
1679 return 1;
1680 }
1681 if (process_config(config_handle, cb_config) == 0) {
1682 fprintf(stderr, "Configuration file %s parsing error\n",
1683 config);
1684 fclose(config_handle);
1685 return 1;
1686 }
1687 fclose(config_handle);
1688
1689 /* For debug. */
1690 if (cb_config->debug) {
1691 dump_psp_firmwares(amd_psp_fw_table);
1692 dump_bdt_firmwares(amd_bios_table);
1693 }
1694 return 0;
1695}
1696
1697int main(int argc, char **argv)
1698{

Callers 1

mainFunction · 0.85

Calls 7

fopenFunction · 0.85
fprintfFunction · 0.85
strerrorFunction · 0.85
process_configFunction · 0.85
fcloseFunction · 0.85
dump_psp_firmwaresFunction · 0.85
dump_bdt_firmwaresFunction · 0.85

Tested by

no test coverage detected