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:01:42 +0800 |
commit | 1f0b2f8aa0687abe6dd4a509fc46022a6a74e661 (patch) | |
tree | 37bbfbeec46c5a475c41954b78a7d7b848c43397 | |
parent | 2c6e590aed21fa9c40944c0f4c5960e8410f7839 (diff) | |
download | reset-1f0b2f8aa0687abe6dd4a509fc46022a6a74e661.tar.gz |
power: reset: align all thermal shutdown scenarioandroid-t-qpr2-beta-3_r0.5android-t-qpr2-beta-3_r0.4android-t-qpr2-beta-3_r0.3android-t-qpr2-beta-3.2_r0.6android-t-qpr2-beta-3.2_r0.5android-13.0.0_r0.91android-13.0.0_r0.77android-13.0.0_r0.75android-13.0.0_r0.74android-13.0.0_r0.73android-13.0.0_r0.70android-13.0.0_r0.69android-13.0.0_r0.68android-13.0.0_r0.64android-gs-tangorpro-5.10-android13-d2android-gs-raviole-5.10-android13-qpr2-betaandroid-gs-raviole-5.10-android13-qpr2android-gs-pantah-5.10-t-qpr2-beta-3.2android-gs-pantah-5.10-android13-qpr2-betaandroid-gs-pantah-5.10-android13-qpr2android-gs-lynx-5.10-android13-qpr2-bandroid-gs-bluejay-5.10-t-qpr2-beta-3android-gs-bluejay-5.10-android13-qpr2-betaandroid-gs-bluejay-5.10-android13-qpr2
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
-rw-r--r-- | exynos-gs101-reboot.c | 4 | ||||
-rw-r--r-- | exynos-gs201-reboot.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/exynos-gs101-reboot.c b/exynos-gs101-reboot.c index 140585c..c9bd602 100644 --- a/exynos-gs101-reboot.c +++ b/exynos-gs101-reboot.c @@ -142,8 +142,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 bb658d0..224aa2d 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; |