small fix in SD card manager
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-02-10 14:09:39 +01:00
parent 1cad316575
commit bd455b750c
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,10 @@ change warranting a new major release:
eive-tmtc: v2.12.3
## Fixed
- `SdCardManager.cpp` `isSdCardUsable`: Use `ext4` instead of `vfat` to check read-only state.
# [v1.26.3] 2023-02-09
eive-tmtc: v2.12.2

View File

@ -505,9 +505,9 @@ bool SdCardManager::isSdCardUsable(std::optional<sd::SdCard> sdCard) {
ReturnValue_t SdCardManager::isSdCardMountedReadOnly(sd::SdCard sdcard, bool& readOnly) {
std::ostringstream command;
if (sdcard == sd::SdCard::SLOT_0) {
command << "grep -q '" << config::SD_0_MOUNT_POINT << " vfat ro,' /proc/mounts";
command << "grep -q '" << config::SD_0_MOUNT_POINT << " ext4 ro,' /proc/mounts";
} else if (sdcard == sd::SdCard::SLOT_1) {
command << "grep -q '" << config::SD_1_MOUNT_POINT << " vfat ro,' /proc/mounts";
command << "grep -q '" << config::SD_1_MOUNT_POINT << " ext4 ro,' /proc/mounts";
} else {
return returnvalue::FAILED;
}