summaryrefslogtreecommitdiff
path: root/fs/proc/kmsg.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-10-04 14:39:12 +0400
committerAlexey Dobriyan <adobriyan@gmail.com>2008-10-23 14:35:08 +0400
commitae048112c099b0f3adb57f7c0b3a49bc62244609 (patch)
tree2ac80f435ab8d5a30e5eb461baa5d86050ec5c55 /fs/proc/kmsg.c
parent659689280ad91d31235db79cda6c7c799c4d3781 (diff)
proc: move /proc/kmsg creation to fs/proc/kmsg.c
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'fs/proc/kmsg.c')
-rw-r--r--fs/proc/kmsg.c12
1 files changed, 9 insertions, 3 deletions
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 @@
#include <linux/time.h>
#include <linux/kernel.h>
#include <linux/poll.h>
+#include <linux/proc_fs.h>
#include <linux/fs.h>
#include <asm/uaccess.h>
#include <asm/io.h>
-#include "internal.h"
-
extern wait_queue_head_t log_wait;
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)
}
-const struct file_operations proc_kmsg_operations = {
+static const struct file_operations proc_kmsg_operations = {
.read = kmsg_read,
.poll = kmsg_poll,
.open = kmsg_open,
.release = kmsg_release,
};
+
+static int __init proc_kmsg_init(void)
+{
+ proc_create("kmsg", S_IRUSR, NULL, &proc_kmsg_operations);
+ return 0;
+}
+module_init(proc_kmsg_init);