1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fpga: remove std::filesystem and properly retrieve searchPath from

configPath

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-02-26 18:42:02 +01:00 committed by Niklas Eiling
parent ea0bfcf7f4
commit 49523a5076
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,6 @@
#pragma once
#include <filesystem>
#include <fmt/ostream.h>
#include <iostream>
#include <jansson.h>
@ -66,7 +65,7 @@ public:
PathSourceList sources; // A list of path sources which reference this node.
PathDestinationList
destinations; // A list of path destinations which reference this node.
std::filesystem::path configPath;
std::string configPath;
#ifdef __linux__
int fwmark; // Socket mark for netem, routing and filtering

View file

@ -122,7 +122,7 @@ int FpgaNode::parse(json_t *json) {
} else {
cardName = "anonymous Card";
}
auto searchPath = configPath.parent_path();
auto searchPath = configPath.substr(0, configPath.rfind("/"));
card = createCard(jsonCard, searchPath, vfioContainer, cardName);
if (card == nullptr) {
throw ConfigError(jsonCard, "node-config-fpga", "Failed to create card");
@ -249,7 +249,8 @@ int FpgaNodeFactory::start(SuperNode *sn) {
}
if (cards.empty()) {
std::string searchPath = sn->getConfigPath() + "/..";
auto searchPath =
sn->getConfigPath().substr(0, sn->getConfigPath().rfind("/"));
createCards(sn->getConfig(), cards, searchPath);
}