LCOV - code coverage report
Current view: top level - fs/proc - version.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 10 40.0 %
Date: 2023-03-27 20:00:47 Functions: 1 2 50.0 %

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0
       2             : #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             : #include "internal.h"
       9             : 
      10           0 : static int version_proc_show(struct seq_file *m, void *v)
      11             : {
      12           0 :         seq_printf(m, linux_proc_banner,
      13           0 :                 utsname()->sysname,
      14           0 :                 utsname()->release,
      15           0 :                 utsname()->version);
      16           0 :         return 0;
      17             : }
      18             : 
      19           1 : static int __init proc_version_init(void)
      20             : {
      21             :         struct proc_dir_entry *pde;
      22             : 
      23           1 :         pde = proc_create_single("version", 0, NULL, version_proc_show);
      24           1 :         pde_make_permanent(pde);
      25           1 :         return 0;
      26             : }
      27             : fs_initcall(proc_version_init);

Generated by: LCOV version 1.14