aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/ksysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r--kernel/ksysfs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 6046939d0804..38b38f957ef0 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -61,6 +61,15 @@ static ssize_t kexec_crash_loaded_show(struct kset *kset, char *page)
61 return sprintf(page, "%d\n", !!kexec_crash_image); 61 return sprintf(page, "%d\n", !!kexec_crash_image);
62} 62}
63KERNEL_ATTR_RO(kexec_crash_loaded); 63KERNEL_ATTR_RO(kexec_crash_loaded);
64
65static ssize_t vmcoreinfo_show(struct kset *kset, char *page)
66{
67 return sprintf(page, "%lx %x\n",
68 paddr_vmcoreinfo_note(),
69 vmcoreinfo_max_size);
70}
71KERNEL_ATTR_RO(vmcoreinfo);
72
64#endif /* CONFIG_KEXEC */ 73#endif /* CONFIG_KEXEC */
65 74
66/* 75/*
@@ -96,6 +105,7 @@ static struct attribute * kernel_attrs[] = {
96#ifdef CONFIG_KEXEC 105#ifdef CONFIG_KEXEC
97 &kexec_loaded_attr.attr, 106 &kexec_loaded_attr.attr,
98 &kexec_crash_loaded_attr.attr, 107 &kexec_crash_loaded_attr.attr,
108 &vmcoreinfo_attr.attr,
99#endif 109#endif
100 NULL 110 NULL
101}; 111};