3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-14 11:15:54 +00:00
Brooklyn/fs/proc/version.c

28 lines
599 B
C
Raw Normal View History

2022-04-02 18:17:33 +05:00
// SPDX-License-Identifier: GPL-2.0
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/utsname.h>
2022-12-14 11:30:32 +05:00
#include "internal.h"
2022-04-02 18:17:33 +05:00
static int version_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, linux_proc_banner,
utsname()->sysname,
utsname()->release,
utsname()->version);
return 0;
}
static int __init proc_version_init(void)
{
2022-12-14 11:30:32 +05:00
struct proc_dir_entry *pde;
pde = proc_create_single("version", 0, NULL, version_proc_show);
pde_make_permanent(pde);
2022-04-02 18:17:33 +05:00
return 0;
}
fs_initcall(proc_version_init);