fs/proc/cmdline.c
Source file repositories/reference/linux-study-clean/fs/proc/cmdline.c
File Facts
- System
- Linux kernel
- Corpus path
fs/proc/cmdline.c- Extension
.c- Size
- 540 bytes
- Lines
- 25
- 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/proc_fs.hlinux/seq_file.hinternal.h
Detected Declarations
function cmdline_proc_showfunction proc_cmdline_initmodule init proc_cmdline_init
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include "internal.h"
static int cmdline_proc_show(struct seq_file *m, void *v)
{
seq_puts(m, saved_command_line);
seq_putc(m, '\n');
return 0;
}
static int __init proc_cmdline_init(void)
{
struct proc_dir_entry *pde;
pde = proc_create_single("cmdline", 0, NULL, cmdline_proc_show);
pde_make_permanent(pde);
pde->size = saved_command_line_len + 1;
return 0;
}
fs_initcall(proc_cmdline_init);
Annotation
- Immediate include surface: `linux/fs.h`, `linux/init.h`, `linux/proc_fs.h`, `linux/seq_file.h`, `internal.h`.
- Detected declarations: `function cmdline_proc_show`, `function proc_cmdline_init`, `module init proc_cmdline_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.