mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
panic/reboot: allow specifying reboot_mode for panic only
Allow specifying reboot_mode for panic only. This is needed on systems where ramoops is used to store panic logs, and user wants to use warm reset to preserve those, while still having cold reset on normal reboots. Link: http://lkml.kernel.org/r/20190322004735.27702-1-aaro.koskinen@iki.fi Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c39ea0b9dd
commit
b287a25a71
4 changed files with 22 additions and 6 deletions
|
@ -306,6 +306,8 @@ void panic(const char *fmt, ...)
|
|||
* shutting down. But if there is a chance of
|
||||
* rebooting the system it will be rebooted.
|
||||
*/
|
||||
if (panic_reboot_mode != REBOOT_UNDEFINED)
|
||||
reboot_mode = panic_reboot_mode;
|
||||
emergency_restart();
|
||||
}
|
||||
#ifdef __sparc__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue