diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/internal.h | 1 | ||||
-rw-r--r-- | fs/proc/kmsg.c | 12 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 3 |
3 files changed, 9 insertions, 7 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index d5bf4dec6b0a..3e8aeb8b61ce 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -61,7 +61,6 @@ extern const struct file_operations proc_smaps_operations; | |||
61 | extern const struct file_operations proc_clear_refs_operations; | 61 | extern const struct file_operations proc_clear_refs_operations; |
62 | extern const struct file_operations proc_pagemap_operations; | 62 | extern const struct file_operations proc_pagemap_operations; |
63 | extern const struct file_operations proc_net_operations; | 63 | extern const struct file_operations proc_net_operations; |
64 | extern const struct file_operations proc_kmsg_operations; | ||
65 | extern const struct inode_operations proc_net_inode_operations; | 64 | extern const struct inode_operations proc_net_inode_operations; |
66 | 65 | ||
67 | void free_proc_entry(struct proc_dir_entry *de); | 66 | void free_proc_entry(struct proc_dir_entry *de); |
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index 9fd5df3f40ce..7ca78346d3f0 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c | |||
@@ -10,13 +10,12 @@ | |||
10 | #include <linux/time.h> | 10 | #include <linux/time.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/poll.h> | 12 | #include <linux/poll.h> |
13 | #include <linux/proc_fs.h> | ||
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
14 | 15 | ||
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | #include "internal.h" | ||
19 | |||
20 | extern wait_queue_head_t log_wait; | 19 | extern wait_queue_head_t log_wait; |
21 | 20 | ||
22 | extern int do_syslog(int type, char __user *bug, int count); | 21 | extern int do_syslog(int type, char __user *bug, int count); |
@@ -49,9 +48,16 @@ static unsigned int kmsg_poll(struct file *file, poll_table *wait) | |||
49 | } | 48 | } |
50 | 49 | ||
51 | 50 | ||
52 | const struct file_operations proc_kmsg_operations = { | 51 | static const struct file_operations proc_kmsg_operations = { |
53 | .read = kmsg_read, | 52 | .read = kmsg_read, |
54 | .poll = kmsg_poll, | 53 | .poll = kmsg_poll, |
55 | .open = kmsg_open, | 54 | .open = kmsg_open, |
56 | .release = kmsg_release, | 55 | .release = kmsg_release, |
57 | }; | 56 | }; |
57 | |||
58 | static int __init proc_kmsg_init(void) | ||
59 | { | ||
60 | proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); | ||
61 | return 0; | ||
62 | } | ||
63 | module_init(proc_kmsg_init); | ||
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index e177f42496c4..fcac25edaef7 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -605,9 +605,6 @@ void __init proc_misc_init(void) | |||
605 | proc_symlink("mounts", NULL, "self/mounts"); | 605 | proc_symlink("mounts", NULL, "self/mounts"); |
606 | 606 | ||
607 | /* And now for trickier ones */ | 607 | /* And now for trickier ones */ |
608 | #ifdef CONFIG_PRINTK | ||
609 | proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations); | ||
610 | #endif | ||
611 | #ifdef CONFIG_FILE_LOCKING | 608 | #ifdef CONFIG_FILE_LOCKING |
612 | proc_create("locks", 0, NULL, &proc_locks_operations); | 609 | proc_create("locks", 0, NULL, &proc_locks_operations); |
613 | #endif | 610 | #endif |