mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fpga: fpga::createCards not finding a config is not an error
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
353fb545db
commit
214e45c636
1 changed files with 5 additions and 3 deletions
|
@ -262,8 +262,8 @@ int fpga::createCards(json_t *config,
|
|||
|
||||
json_t *fpgas = json_object_get(config, "fpgas");
|
||||
if (fpgas == nullptr) {
|
||||
logger->error("No section 'fpgas' found in config");
|
||||
exit(1);
|
||||
logger->info("No section 'fpgas' found in config");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *card_name;
|
||||
|
@ -319,9 +319,11 @@ std::shared_ptr<fpga::Card> fpga::setupFpgaCard(const std::string &configFile,
|
|||
// Deallocate JSON config
|
||||
json_decref(json);
|
||||
|
||||
if (!card)
|
||||
if (!card) {
|
||||
throw RuntimeError("FPGA card {} not found in config or not working",
|
||||
fpgaName);
|
||||
}
|
||||
|
||||
|
||||
return card;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue