blob: b449f186577f82e0f8e7776d906099ac423d1ed9 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Alexey Dobriyanb457d152008-10-03 11:53:19 +04002#include <linux/fs.h>
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>
8
9static int version_proc_show(struct seq_file *m, void *v)
10{
11 seq_printf(m, linux_proc_banner,
12 utsname()->sysname,
13 utsname()->release,
14 utsname()->version);
15 return 0;
16}
17
Alexey Dobriyanb457d152008-10-03 11:53:19 +040018static int __init proc_version_init(void)
19{
Christoph Hellwig3f3942a2018-05-15 15:57:23 +020020 proc_create_single("version", 0, NULL, version_proc_show);
Alexey Dobriyanb457d152008-10-03 11:53:19 +040021 return 0;
22}
Paul Gortmakerabaf3782014-01-23 15:55:45 -080023fs_initcall(proc_version_init);