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 <[email protected]> Change-Id: Idf2efd3bad865ee9f689509ffd0cdb6c5d7820f3
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 @@ 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 @@ 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;