correction for prefix handling on Q7S
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-02-22 18:06:34 +01:00
parent 9633359db3
commit 90c1d45f20
19 changed files with 66 additions and 30 deletions

View File

@ -1742,18 +1742,21 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
std::string filename = "mram-dump--" + timeStamp + ".bin";
#ifdef XIPHOS_Q7S
std::string currentMountPrefix = sdcMan->getCurrentMountPrefix();
const char* currentMountPrefix = sdcMan->getCurrentMountPrefix();
#else
std::string currentMountPrefix("/mnt/sd0");
const char* currentMountPrefix = "/mnt/sd0";
#endif /* BOARD_TE0720 == 0 */
if (currentMountPrefix == nullptr) {
return returnvalue::FAILED;
}
// Check if path to PLOC directory exists
if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + supervisorFilePath))) {
if (not std::filesystem::exists(std::string(currentMountPrefix) + "/" + supervisorFilePath)) {
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Supervisor path does not exist"
<< std::endl;
return result::PATH_DOES_NOT_EXIST;
}
activeMramFile = currentMountPrefix + "/" + supervisorFilePath + "/" + filename;
activeMramFile = std::string(currentMountPrefix) + "/" + supervisorFilePath + "/" + filename;
// Create new file
std::ofstream file(activeMramFile, std::ios_base::out);
file.close();