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

Commit a76da213 authored by Daniel Zheng's avatar Daniel Zheng Committed by Automerger Merge Worker
Browse files

Merge "Asserting flashing plan is used in do_flash" into main am: e1a473cd...

Merge "Asserting flashing plan is used in do_flash" into main am: e1a473cd am: 18fab082 am: 2baebf93

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2653214



Change-Id: I7a0d870602daa822b121fd8dd81bcffd5df4cd1c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b3c39685 2baebf93
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1489,10 +1489,13 @@ static std::string repack_ramdisk(const char* pname, struct fastboot_buffer* buf

void do_flash(const char* pname, const char* fname, const bool apply_vbmeta,
              const FlashingPlan* fp) {
    if (!fp) {
        die("do flash was called without a valid flashing plan");
    }
    verbose("Do flash %s %s", pname, fname);
    struct fastboot_buffer buf;

    if (fp && fp->source) {
    if (fp->source) {
        unique_fd fd = fp->source->OpenFile(fname);
        if (fd < 0 || !load_buf_fd(std::move(fd), &buf, fp)) {
            die("could not load '%s': %s", fname, strerror(errno));