| 1669 | } |
| 1670 | |
| 1671 | static 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 | |
| 1697 | int main(int argc, char **argv) |
| 1698 | { |
no test coverage detected