combining those is acutally problematic..
This commit is contained in:
parent
73279a0bf3
commit
0b3c928886
@ -179,9 +179,12 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashWrite() {
|
||||
|
||||
ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
|
||||
std::error_code e;
|
||||
std::ofstream ofile(flashReadAndWrite.obcFile,
|
||||
std::ios::trunc | std::ios::binary | std::ios::app);
|
||||
if (ofile.bad()) {
|
||||
if (std::filesystem::exists(flashReadAndWrite.obcFile)) {
|
||||
// Truncate the file first.
|
||||
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::trunc);
|
||||
}
|
||||
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::app);
|
||||
if (ofile.bad() or not ofile.is_open()) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
ReturnValue_t result = flashfopen(mpsoc::FileAccessModes::READ);
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit dccbf89da1e2b441a8fc3edc247550ca5dfbd68b
|
||||
Subproject commit 067a0160405bcf53659072749eddbb7ad7f1d41c
|
Loading…
Reference in New Issue
Block a user