boot_reason: Add reasons for boot_reason_test.sh

Add "power_on_key" and "power_on_cable" to match
heuristics in system/core/bootstat/bootstat.cpp

Change-Id: I947026d658c8a385aab7a3ade9efacffb9538d56
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
This commit is contained in:
jiajia tang 2022-07-07 11:12:12 +08:00
parent 0c1fdc1a09
commit 52f9adf176
1 changed files with 14 additions and 14 deletions

View File

@ -518,20 +518,20 @@ validate_reason() {
reboot,bootloader | reboot,bootloader,* ) var=${var#reboot,} ; var=${var%,} ;;
reboot | reboot,?* ) ;;
# Aliases and Heuristics
*wdog* | *watchdog* ) var="watchdog" ;;
*powerkey* | *power_key* | *PowerKey* ) var="cold,powerkey" ;;
*panic* | *kernel_panic* ) var="kernel_panic" ;;
*thermal* ) var="shutdown,thermal" ;;
*s3_wakeup* ) var="warm,s3_wakeup" ;;
*hw_reset* ) var="hard,hw_reset" ;;
*usb* ) var="cold,charger" ;;
*rtc* ) var="cold,rtc" ;;
*2sec_reboot* ) var="cold,rtc,2sec" ;;
*wdt_by_pass_pwk* ) var="warm" ;;
wdt ) var="reboot" ;;
*tool_by_pass_pwk* ) var="reboot,tool" ;;
*bootloader* ) var="bootloader" ;;
* ) var="reboot" ;;
*wdog* | *watchdog* ) var="watchdog" ;;
*powerkey* | *power_on_key* | *power_key* | *PowerKey* ) var="cold,powerkey" ;;
*panic* | *kernel_panic* ) var="kernel_panic" ;;
*thermal* ) var="shutdown,thermal" ;;
*s3_wakeup* ) var="warm,s3_wakeup" ;;
*hw_reset* ) var="hard,hw_reset" ;;
*usb* | *power_on_cable* ) var="cold,charger" ;;
*rtc* ) var="cold,rtc" ;;
*2sec_reboot* ) var="cold,rtc,2sec" ;;
*wdt_by_pass_pwk* ) var="warm" ;;
wdt ) var="reboot" ;;
*tool_by_pass_pwk* ) var="reboot,tool" ;;
*bootloader* ) var="bootloader" ;;
* ) var="reboot" ;;
esac
echo ${var}
}