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

Commit dddb5fa8 authored by Daniel Zheng's avatar Daniel Zheng Committed by Gerrit Code Review
Browse files

Merge "Correcting Reboot Task Functionality"

parents 57c1a4e3 1418fb8c
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2255,7 +2255,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
            if (args.size() == 1) {
                std::string reboot_target = next_arg(&args);
                reboot_task = std::make_unique<RebootTask>(fp.get(), reboot_target);
            } else {
            } else if (!fp->skip_reboot) {
                reboot_task = std::make_unique<RebootTask>(fp.get());
            }
            if (!args.empty()) syntax_error("junk after reboot command");
@@ -2310,7 +2310,9 @@ int FastBootTool::Main(int argc, char* argv[]) {
            } else {
                do_flashall(fp.get());
            }
            if (!fp->skip_reboot) {
                reboot_task = std::make_unique<RebootTask>(fp.get());
            }
        } else if (command == "update") {
            bool slot_all = (slot_override == "all");
            if (slot_all) {
@@ -2322,7 +2324,9 @@ int FastBootTool::Main(int argc, char* argv[]) {
                filename = next_arg(&args);
            }
            do_update(filename.c_str(), fp.get());
            if (!fp->skip_reboot) {
                reboot_task = std::make_unique<RebootTask>(fp.get());
            }
        } else if (command == FB_CMD_SET_ACTIVE) {
            std::string slot = verify_slot(next_arg(&args), false);
            fb->SetActive(slot);
@@ -2411,7 +2415,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
    if (fp->wants_set_active) {
        fb->SetActive(next_active);
    }
    if (reboot_task && !fp->skip_reboot) {
    if (reboot_task) {
        reboot_task->Run();
    }
    fprintf(stderr, "Finished. Total time: %.3fs\n", (now() - start));