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

Commit 2712192e authored by Josh Gao's avatar Josh Gao
Browse files

adbd: fix check of `remount -R`.

The check was accidentally flipped when refactoring from strcmp to
std::string::operator==, inverting the behavior of `remount -R`.

Test: `adb remount` with verity enabled
Change-Id: Ib43889f1f4cc2f8fe1fd5d6e17e47d538dbe91bd
parent 0937a845
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -216,7 +216,7 @@ static void reboot_for_remount(int fd, bool need_fsck) {
}

void remount_service(unique_fd fd, const std::string& cmd) {
    bool user_requested_reboot = cmd != "-R";
    bool user_requested_reboot = cmd == "-R";

    if (getuid() != 0) {
        WriteFdExactly(fd.get(), "Not running as root. Try \"adb root\" first.\n");