Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 #include <linux/fs.h>
0003 #include <linux/init.h>
0004 #include <linux/kernel.h>
0005 #include <linux/proc_fs.h>
0006 #include <linux/seq_file.h>
0007 #include <linux/utsname.h>
0008 
0009 static int version_proc_show(struct seq_file *m, void *v)
0010 {
0011     seq_printf(m, linux_proc_banner,
0012         utsname()->sysname,
0013         utsname()->release,
0014         utsname()->version);
0015     return 0;
0016 }
0017 
0018 static int __init proc_version_init(void)
0019 {
0020     proc_create_single("version", 0, NULL, version_proc_show);
0021     return 0;
0022 }
0023 fs_initcall(proc_version_init);