diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-05-12 13:53:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-14 19:51:49 +0000 |
commit | 87369ed13148daded59b374dd94dcd2a87addf17 (patch) | |
tree | 2335ee79598e953d6b47e33bdd039250f399e2d3 | |
parent | 265257f8fd1e3271202b812add4de1d3bebe9eb1 (diff) | |
download | chrome-ec-87369ed13148daded59b374dd94dcd2a87addf17.tar.gz |
system: Add option to console command to reboot to RO
This is the same as "ap-off-in-ro", except it does not have the "AP_OFF"
flag.
BRANCH=none
BUG=b:156401765
TEST=make buildall -j
TEST=On bloonchipper console:
> reboot ro
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I2f74b8c0558f60a5d5da0fe44ba30158bd946a15
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2197623
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Craig Hesling <hesling@chromium.org>
-rw-r--r-- | common/system.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/system.c b/common/system.c index aa427e0dc0..354b205595 100644 --- a/common/system.c +++ b/common/system.c @@ -1236,6 +1236,8 @@ static int command_reboot(int argc, char **argv) } else if (!strcasecmp(argv[i], "ap-off-in-ro")) { flags |= (SYSTEM_RESET_LEAVE_AP_OFF | SYSTEM_RESET_STAY_IN_RO); + } else if (!strcasecmp(argv[i], "ro")) { + flags |= SYSTEM_RESET_STAY_IN_RO; } else if (!strcasecmp(argv[i], "cancel")) { reboot_at_shutdown = EC_REBOOT_CANCEL; return EC_SUCCESS; @@ -1260,7 +1262,8 @@ static int command_reboot(int argc, char **argv) } DECLARE_CONSOLE_COMMAND( reboot, command_reboot, - "[hard|soft] [preserve] [ap-off] [wait-ext] [cancel] [ap-off-in-ro]", + "[hard|soft] [preserve] [ap-off] [wait-ext] [cancel] [ap-off-in-ro]" + " [ro]", "Reboot the EC"); #ifdef CONFIG_CMD_SYSLOCK |