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

Commit 02627a9d authored by David Pursell's avatar David Pursell Committed by android-build-merger
Browse files

Merge "fastboot: fix set_active for legacy A/B." am: 719263e6 am: 494737b0

am: 32d5a501

Change-Id: Ibacf228f03f0d83014dffc116c0d513897450f78
parents 352b9c62 32d5a501
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1742,6 +1742,14 @@ int main(int argc, char **argv)
        } else if(!strcmp(*argv, "set_active")) {
            require(2);
            std::string slot = verify_slot(transport, std::string(argv[1]), false);
            // Legacy support: verify_slot() removes leading underscores, we need to put them back
            // in for old bootloaders. Legacy bootloaders do not have the slot-count variable but
            // do have slot-suffixes.
            std::string var;
            if (!fb_getvar(transport, "slot-count", &var) &&
                    fb_getvar(transport, "slot-suffixes", &var)) {
                slot = "_" + slot;
            }
            fb_set_active(slot.c_str());
            skip(2);
        } else if(!strcmp(*argv, "oem")) {