diff options
author | Elliott Hughes <enh@google.com> | 2015-02-25 10:02:00 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-02-25 10:02:00 -0800 |
commit | ca85df0662735eaefd512e63eab83caf994be1a6 (patch) | |
tree | 54fa7021c36082cfde737975b85e4b79f8982a17 /fastboot | |
parent | 5329d3fd54fa875bb7de78a8c40134cc63921c64 (diff) | |
download | system_core-ca85df0662735eaefd512e63eab83caf994be1a6.zip system_core-ca85df0662735eaefd512e63eab83caf994be1a6.tar.gz system_core-ca85df0662735eaefd512e63eab83caf994be1a6.tar.bz2 |
Support "fastboot reboot bootloader".
This matches the more general adb syntax, though the fastboot
protocol doesn't support rebooting into the recovery image.
Change-Id: I6d93d4c63d4a9b81c71e681e7a7bf76867fba019
Diffstat (limited to 'fastboot')
-rw-r--r-- | fastboot/fastboot.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c index 959d3ad..fc544a6 100644 --- a/fastboot/fastboot.c +++ b/fastboot/fastboot.c @@ -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" @@ -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); |