New total reboot counter handling #708
@ -2135,6 +2135,7 @@ void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
|||||||
using namespace std::filesystem;
|
using namespace std::filesystem;
|
||||||
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
std::string path = currMntPrefix + REBOOT_WATCHDOG_FILE;
|
||||||
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
std::string legacyPath = currMntPrefix + LEGACY_REBOOT_WATCHDOG_FILE;
|
||||||
|
{
|
||||||
std::ofstream rebootFile(path);
|
std::ofstream rebootFile(path);
|
||||||
if (rebootFile.is_open()) {
|
if (rebootFile.is_open()) {
|
||||||
// Initiate reboot file first. Reboot handling will be on on initialization
|
// Initiate reboot file first. Reboot handling will be on on initialization
|
||||||
@ -2148,6 +2149,7 @@ void CoreController::rewriteRebootWatchdogFile(RebootWatchdogFile file) {
|
|||||||
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
<< "\nnext: " << static_cast<int>(file.mechanismNextChip) << " "
|
||||||
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
<< static_cast<int>(file.mechanismNextCopy) << "\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
std::error_code e;
|
std::error_code e;
|
||||||
// TODO: Remove at some point in the future when all images have been updated.
|
// TODO: Remove at some point in the future when all images have been updated.
|
||||||
if (std::filesystem::exists(legacyPath)) {
|
if (std::filesystem::exists(legacyPath)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user