diff options
author | Jone Chou <jonechou@google.com> | 2022-12-20 20:42:46 +0800 |
---|---|---|
committer | Jone Chou <jonechou@google.com> | 2022-12-21 02:09:07 +0800 |
commit | 2e79cadfe8ca4890f30da955f70a8a3cfbe688be (patch) | |
tree | 9e183ed5c033730a0368e145665976218dbeaa48 | |
parent | e09e2920dfff28357949f640d09c9eaf296a6279 (diff) | |
download | reset-2e79cadfe8ca4890f30da955f70a8a3cfbe688be.tar.gz |
power: reset: align all thermal shutdown scenario
Senario:
- warm reset -> debug boot -> memory wipe -> power off
Commands:
- adb reboot "shutdown,thermal[sub-reason]"
- adb reboot "shutdown-thermal[sub-reason]"
Bug: 263071957
signed-off-by: Jone Chou <jonechou@google.com>
Change-Id: Idf2efd3bad865ee9f689509ffd0cdb6c5d7820f3
(cherry picked from commit 1f0b2f8aa0687abe6dd4a509fc46022a6a74e661)
-rw-r--r-- | exynos-gs101-reboot.c | 4 | ||||
-rw-r--r-- | exynos-gs201-reboot.c | 4 | ||||
-rw-r--r-- | exynos-zuma-reboot.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/exynos-gs101-reboot.c b/exynos-gs101-reboot.c index 70d5c70..b65ce09 100644 --- a/exynos-gs101-reboot.c +++ b/exynos-gs101-reboot.c @@ -143,8 +143,8 @@ static void exynos_reboot_parse(const char *cmd) value = REBOOT_MODE_DMVERITY_CORRUPTED; } else if (!strcmp(cmd, "rescue")) { value = REBOOT_MODE_RESCUE; - } else if (!strcmp(cmd, "shutdown-thermal") || - !strcmp(cmd, "shutdown,thermal")) { + } else if (!strncmp(cmd, "shutdown-thermal", strlen("shutdown-thermal")) || + !strncmp(cmd, "shutdown,thermal", strlen("shutdown,thermal"))) { if (force_warm_reboot_on_thermal_shutdown) force_warm_reboot = true; value = REBOOT_MODE_SHUTDOWN_THERMAL; diff --git a/exynos-gs201-reboot.c b/exynos-gs201-reboot.c index 96fa1d7..27fc66a 100644 --- a/exynos-gs201-reboot.c +++ b/exynos-gs201-reboot.c @@ -83,8 +83,8 @@ static void exynos_reboot_parse(const char *cmd) value = REBOOT_MODE_DMVERITY_CORRUPTED; } else if (!strcmp(cmd, "rescue")) { value = REBOOT_MODE_RESCUE; - } else if (!strcmp(cmd, "shutdown-thermal") || - !strcmp(cmd, "shutdown,thermal")) { + } else if (!strncmp(cmd, "shutdown-thermal", strlen("shutdown-thermal")) || + !strncmp(cmd, "shutdown,thermal", strlen("shutdown,thermal"))) { if (force_warm_reboot_on_thermal_shutdown) force_warm_reboot = true; value = REBOOT_MODE_SHUTDOWN_THERMAL; diff --git a/exynos-zuma-reboot.c b/exynos-zuma-reboot.c index 114b60b..d58f517 100644 --- a/exynos-zuma-reboot.c +++ b/exynos-zuma-reboot.c @@ -82,8 +82,8 @@ static void exynos_reboot_parse(const char *cmd) value = REBOOT_MODE_DMVERITY_CORRUPTED; } else if (!strcmp(cmd, "rescue")) { value = REBOOT_MODE_RESCUE; - } else if (!strcmp(cmd, "shutdown-thermal") || - !strcmp(cmd, "shutdown,thermal")) { + } else if (!strncmp(cmd, "shutdown-thermal", strlen("shutdown-thermal")) || + !strncmp(cmd, "shutdown,thermal", strlen("shutdown,thermal"))) { if (force_warm_reboot_on_thermal_shutdown) force_warm_reboot = true; value = REBOOT_MODE_SHUTDOWN_THERMAL; |