Are there any kernel or libc headers that deal with detecting the boot type?

51 Views Asked by At

I am currently reading /proc/cmdline to determine a device's boot reason. Currently, I am using Android's Canonical Boot Reason from the bootloader to determine why the device booted. I just read the values for androidboot.bootreason, eg

androidboot.bootreason=reboot
androidboot.bootreason=bootloader
androidboot.bootreason=PMIC_cold_reboot

Is there a Linux Kernel API to do something similar?

0

There are 0 best solutions below