Skip to content

Commit

Permalink
Support "fastboot reboot bootloader".
Browse files Browse the repository at this point in the history
This matches the more general adb syntax, though the fastboot
protocol doesn't support rebooting into the recovery image.

Change-Id: I6d93d4c63d4a9b81c71e681e7a7bf76867fba019
  • Loading branch information
enh-google committed Feb 25, 2015
1 parent 5329d3f commit ca85df0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fastboot/fastboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void usage(void)
" flash it\n"
" devices list all connected devices\n"
" continue continue with autoboot\n"
" reboot reboot device normally\n"
" reboot [bootloader] reboot device, optionally into bootloader\n"
" reboot-bootloader reboot device into bootloader\n"
" help show this help message\n"
"\n"
Expand Down Expand Up @@ -1153,6 +1153,14 @@ int main(int argc, char **argv)
} else if(!strcmp(*argv, "reboot")) {
wants_reboot = 1;
skip(1);
if (argc > 0) {
if (!strcmp(*argv, "bootloader")) {
wants_reboot = 0;
wants_reboot_bootloader = 1;
skip(1);
}
}
require(0);
} else if(!strcmp(*argv, "reboot-bootloader")) {
wants_reboot_bootloader = 1;
skip(1);
Expand Down

0 comments on commit ca85df0

Please sign in to comment.