mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
kexec: add a kexec_crash_loaded() function
Provide a wrapper function to be used by kernel code to check whether a crash kernel is loaded. It returns the same value that can be seen in /sys/kernel/kexec_crash_loaded by userspace programs. I'm exporting the function, because it will be used by Xen, and it is possible to compile Xen modules separately to enable the use of PV drivers with unmodified bare-metal kernels. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Petr Tesarik <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Eric Biederman <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Boris Ostrovsky <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Dave Young <[email protected]> Cc: David Vrabel <[email protected]> Cc: Vivek Goyal <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
b26e27ddfd
commit
21db79e8bb
3 changed files with 9 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ KERNEL_ATTR_RO(kexec_loaded);
|
|||
static ssize_t kexec_crash_loaded_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", !!kexec_crash_image);
|
||||
return sprintf(buf, "%d\n", kexec_crash_loaded());
|
||||
}
|
||||
KERNEL_ATTR_RO(kexec_crash_loaded);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue