Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b686ba21 authored by Tianjie Xu's avatar Tianjie Xu
Browse files

updater: Output msg when recovery is called

Output messages in log when recovery is attempted or succeeded during
incremental OTA update.

Change-Id: I4033df7ae3aaecbc61921d5337eda26f79164fda
parent 22d89ecb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1659,6 +1659,9 @@ Value* BlockImageRecoverFn(const char* name, State* state, int argc, Expr* argv[
        return StringValue(strdup(""));
    }

    // Output notice to log when recover is attempted
    fprintf(stderr, "%s image corrupted, attempting to recover...\n", filename->data);

    // When opened with O_RDWR, libfec rewrites corrupted blocks when they are read
    fec::io fh(filename->data, O_RDWR);

@@ -1709,7 +1712,7 @@ Value* BlockImageRecoverFn(const char* name, State* state, int argc, Expr* argv[
            //     read and check if the errors field value has increased.
        }
    }

    fprintf(stderr, "...%s image recovered successfully.\n", filename->data);
    return StringValue(strdup("t"));
}