mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +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:
parent
1995bffe8d
commit
857d9ec3ad
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <filesystem>
|
|
||||||
#include <fmt/ostream.h>
|
#include <fmt/ostream.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <jansson.h>
|
#include <jansson.h>
|
||||||
|
@ -66,7 +65,7 @@ public:
|
||||||
PathSourceList sources; // A list of path sources which reference this node.
|
PathSourceList sources; // A list of path sources which reference this node.
|
||||||
PathDestinationList
|
PathDestinationList
|
||||||
destinations; // A list of path destinations which reference this node.
|
destinations; // A list of path destinations which reference this node.
|
||||||
std::filesystem::path configPath;
|
std::string configPath;
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
int fwmark; // Socket mark for netem, routing and filtering
|
int fwmark; // Socket mark for netem, routing and filtering
|
||||||
|
|
|
@ -122,7 +122,7 @@ int FpgaNode::parse(json_t *json) {
|
||||||
} else {
|
} else {
|
||||||
cardName = "anonymous Card";
|
cardName = "anonymous Card";
|
||||||
}
|
}
|
||||||
auto searchPath = configPath.parent_path();
|
auto searchPath = configPath.substr(0, configPath.rfind("/"));
|
||||||
card = createCard(jsonCard, searchPath, vfioContainer, cardName);
|
card = createCard(jsonCard, searchPath, vfioContainer, cardName);
|
||||||
if (card == nullptr) {
|
if (card == nullptr) {
|
||||||
throw ConfigError(jsonCard, "node-config-fpga", "Failed to create card");
|
throw ConfigError(jsonCard, "node-config-fpga", "Failed to create card");
|
||||||
|
@ -249,7 +249,8 @@ int FpgaNodeFactory::start(SuperNode *sn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cards.empty()) {
|
if (cards.empty()) {
|
||||||
std::string searchPath = sn->getConfigPath() + "/..";
|
auto searchPath =
|
||||||
|
sn->getConfigPath().substr(0, sn->getConfigPath().rfind("/"));
|
||||||
createCards(sn->getConfig(), cards, searchPath);
|
createCards(sn->getConfig(), cards, searchPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue