]>
Commit | Line | Data |
---|---|---|
f876937e AW |
1 | #include <linux/fs.h> |
2 | #include <linux/init.h> | |
3 | #include <linux/kernel.h> | |
4 | #include <linux/proc_fs.h> | |
5 | #include <linux/seq_file.h> | |
6 | #include <linux/utsname.h> | |
7 | ||
8 | static int version_signature_proc_show(struct seq_file *m, void *v) | |
9 | { | |
10 | seq_printf(m, "%s\n", CONFIG_VERSION_SIGNATURE); | |
11 | return 0; | |
12 | } | |
13 | ||
14 | static int version_signature_proc_open(struct inode *inode, struct file *file) | |
15 | { | |
16 | return single_open(file, version_signature_proc_show, NULL); | |
17 | } | |
18 | ||
19 | static const struct file_operations version_signature_proc_fops = { | |
20 | .open = version_signature_proc_open, | |
21 | .read = seq_read, | |
22 | .llseek = seq_lseek, | |
23 | .release = single_release, | |
24 | }; | |
25 | ||
26 | static int __init proc_version_signature_init(void) | |
27 | { | |
28 | proc_create("version_signature", 0, NULL, &version_signature_proc_fops); | |
29 | return 0; | |
30 | } | |
31 | module_init(proc_version_signature_init); |