1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/init.h>
4 #include <linux/kernel.h>
5 #include <linux/proc_fs.h>
6 #include <linux/seq_file.h>
7 #include <linux/utsname.h>
9 static int version_proc_show(struct seq_file
*m
, void *v
)
11 seq_printf(m
, linux_proc_banner
,
18 static int version_proc_open(struct inode
*inode
, struct file
*file
)
20 return single_open(file
, version_proc_show
, NULL
);
23 static const struct file_operations version_proc_fops
= {
24 .open
= version_proc_open
,
27 .release
= single_release
,
30 static int __init
proc_version_init(void)
32 proc_create("version", 0, NULL
, &version_proc_fops
);
35 fs_initcall(proc_version_init
);