This source file includes following definitions.
- kmsg_open
- kmsg_release
- kmsg_read
1
2
3
4
5
6
7
8 #include <linux/types.h>
9 #include <linux/errno.h>
10 #include <linux/sched.h>
11 #include <linux/kernel.h>
12 #include <linux/tty.h>
13
14 #include <asm/segment.h>
15 #include <asm/io.h>
16
17 extern int sys_syslog(int type, char * bug, int count);
18
19 static int kmsg_open(struct inode * inode, struct file * file)
20 {
21 return sys_syslog(1,NULL,0);
22 }
23
24 static void kmsg_release(struct inode * inode, struct file * file)
25 {
26 (void) sys_syslog(0,NULL,0);
27 }
28
29 static int kmsg_read(struct inode * inode, struct file * file,char * buf, int count)
30 {
31 return sys_syslog(2,buf,count);
32 }
33
34 static struct file_operations proc_kmsg_operations = {
35 NULL,
36 kmsg_read,
37 NULL,
38 NULL,
39 NULL,
40 NULL,
41 NULL,
42 kmsg_open,
43 kmsg_release
44 };
45
46 struct inode_operations proc_kmsg_inode_operations = {
47 &proc_kmsg_operations,
48 NULL,
49 NULL,
50 NULL,
51 NULL,
52 NULL,
53 NULL,
54 NULL,
55 NULL,
56 NULL,
57 NULL,
58 NULL,
59 NULL,
60 NULL
61 };