Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24-rc4 /kernel/ksysfs.c

Filename:/kernel/ksysfs.c
Lines Added:18
Lines Deleted:0
Also changed in: (Previous) 2.6.24-rc3  2.6.24-rc2  2.6.24-rc1  2.6.23-git19  2.6.23-git18  2.6.23-git17 
(Following) 2.6.24-rc5  2.6.24-rc6  2.6.24-rc7  2.6.24-rc8  2.6.24  2.6.24-git1 

Location
[  2.6.24-rc4
  [  kernel
     o  ksysfs.c

Patch

diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index d0e5c48..65daa53 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -14,6 +14,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kexec.h>
+#include <linux/sched.h>
 
 #define KERNEL_ATTR_RO(_name) \
 static struct subsys_attribute _name##_attr = __ATTR_RO(_name)
@@ -60,6 +61,15 @@ static ssize_t kexec_crash_loaded_show(struct kset *kset, char *page)
    return sprintf(page, "%d\n", !!kexec_crash_image);
 }
 KERNEL_ATTR_RO(kexec_crash_loaded);
+
+static ssize_t vmcoreinfo_show(struct kset *kset, char *page)
+{
+   return sprintf(page, "%lx %x\n",
+             paddr_vmcoreinfo_note(),
+             (unsigned int)vmcoreinfo_max_size);
+}
+KERNEL_ATTR_RO(vmcoreinfo);
+
 #endif /* CONFIG_KEXEC */
 
 /*
@@ -95,6 +105,7 @@ static struct attribute * kernel_attrs[] = {
 #ifdef CONFIG_KEXEC
    &kexec_loaded_attr.attr,
    &kexec_crash_loaded_attr.attr,
+   &vmcoreinfo_attr.attr,
 #endif
    NULL
 };
@@ -116,6 +127,13 @@ static int __init ksysfs_init(void)
                      ¬es_attr);
    }
 
+   /*
+    * Create "/sys/kernel/uids" directory and corresponding root user's
+    * directory under it.
+    */
+   if (!error)
+      error = uids_kobject_init();
+
    return error;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.