Skip to content

Commit

Permalink
proc: move /proc/vmcore creation to fs/proc/vmcore.c
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
  • Loading branch information
Alexey Dobriyan committed Oct 23, 2008
1 parent 6d80e53 commit 5aa140c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions fs/proc/proc_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 3 additions & 3 deletions fs/proc/vmcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
};

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions include/linux/crash_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 5aa140c

Please sign in to comment.