moved definitions
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-09-26 11:39:17 +02:00
parent 7d824f5448
commit 05adc91f94
7 changed files with 36 additions and 31 deletions

View File

@ -4,6 +4,7 @@
#include <fstream>
#include "SdCardManager.h"
#include "eive/definitions.h"
#include "fsfw/serviceinterface.h"
FilesystemHelper::FilesystemHelper() {}
@ -14,14 +15,13 @@ ReturnValue_t FilesystemHelper::checkPath(std::string path) {
sif::warning << "FilesystemHelper::checkPath: Invalid SD card manager" << std::endl;
return returnvalue::FAILED;
}
if (path.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) ==
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
if (path.substr(0, sizeof(config::SD_0_MOUNT_POINT)) == std::string(config::SD_0_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "FilesystemHelper::checkPath: SD card 0 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
} else if (path.substr(0, sizeof(SdCardManager::SD_1_MOUNT_POINT)) ==
std::string(SdCardManager::SD_1_MOUNT_POINT)) {
} else if (path.substr(0, sizeof(config::SD_1_MOUNT_POINT)) ==
std::string(config::SD_1_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "FilesystemHelper::checkPath: SD card 1 not mounted" << std::endl;
return SD_NOT_MOUNTED;