]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
proc: move /proc/vmcore creation to fs/proc/vmcore.c
authorAlexey Dobriyan <adobriyan@gmail.com>
Mon, 6 Oct 2008 10:36:31 +0000 (14:36 +0400)
committerAlexey Dobriyan <adobriyan@gmail.com>
Thu, 23 Oct 2008 14:51:22 +0000 (18:51 +0400)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
fs/proc/proc_misc.c
fs/proc/vmcore.c
include/linux/crash_dump.h

index 2ef9ef9bc8c1653e4bda0fc36fbe13fd65c121c2..e2db35006c05c2457f8fa779bb45acbcf6ac78fb 100644 (file)
@@ -62,7 +62,4 @@ void __init proc_misc_init(void)
        proc_symlink("mounts", NULL, "self/mounts");
 
        /* And now for trickier ones */
-#ifdef CONFIG_PROC_VMCORE
-       proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &proc_vmcore_operations);
-#endif
 }
index cd9ca67f841bd38d6256f14eccfd3fd6d8174522..03ec595049065f41b2513d9b94e76058a02ebfec 100644 (file)
@@ -32,7 +32,7 @@ static size_t elfcorebuf_sz;
 /* Total size of vmcore file. */
 static u64 vmcore_size;
 
-struct proc_dir_entry *proc_vmcore = NULL;
+static struct proc_dir_entry *proc_vmcore = NULL;
 
 /* Reads a page from the oldmem device from given offset. */
 static ssize_t read_from_oldmem(char *buf, size_t count,
@@ -162,7 +162,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
        return acc;
 }
 
-const struct file_operations proc_vmcore_operations = {
+static const struct file_operations proc_vmcore_operations = {
        .read           = read_vmcore,
 };
 
@@ -652,7 +652,7 @@ static int __init vmcore_init(void)
                return rc;
        }
 
-       /* Initialize /proc/vmcore size if proc is already up. */
+       proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &proc_vmcore_operations);
        if (proc_vmcore)
                proc_vmcore->size = vmcore_size;
        return 0;
index 0acf3b737e2ea179c30d9c9fa69076fbdf488a1c..2dac064d8359046c178f0d98bd9ea915ca369eaa 100644 (file)
@@ -14,8 +14,6 @@ extern unsigned long long elfcorehdr_addr;
 
 extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
                                                unsigned long, int);
-extern const struct file_operations proc_vmcore_operations;
-extern struct proc_dir_entry *proc_vmcore;
 
 /* Architecture code defines this if there are other possible ELF
  * machine types, e.g. on bi-arch capable hardware. */