fs/proc/version.c
Source file repositories/reference/linux-study-clean/fs/proc/version.c
File Facts
- System
- Linux kernel
- Corpus path
fs/proc/version.c- Extension
.c- Size
- 599 bytes
- Lines
- 28
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/init.hlinux/kernel.hlinux/proc_fs.hlinux/seq_file.hlinux/utsname.hinternal.h
Detected Declarations
function version_proc_showfunction proc_version_initmodule init proc_version_init
Annotated Snippet
// 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>
#include "internal.h"
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)
{
struct proc_dir_entry *pde;
pde = proc_create_single("version", 0, NULL, version_proc_show);
pde_make_permanent(pde);
return 0;
}
fs_initcall(proc_version_init);
Annotation
- Immediate include surface: `linux/fs.h`, `linux/init.h`, `linux/kernel.h`, `linux/proc_fs.h`, `linux/seq_file.h`, `linux/utsname.h`, `internal.h`.
- Detected declarations: `function version_proc_show`, `function proc_version_init`, `module init proc_version_init`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.