| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
#include <linux/fs.h> |
| 3 |
#include <linux/init.h> |
| 4 |
#include <linux/proc_fs.h> |
| 5 |
#include <linux/seq_file.h> |
| 6 |
#include "internal.h" |
| 7 |
|
| 8 |
static int cmdline_proc_show(struct seq_file *m, void *v) |
| 9 |
{ |
| 10 |
seq_puts(m, saved_command_line); |
| 11 |
seq_putc(m, '\n'); |
| 12 |
return 0; |
| 13 |
} |
| 14 |
|
| 15 |
static int __init proc_cmdline_init(void) |
| 16 |
{ |
| 17 |
struct proc_dir_entry *pde; |
| 18 |
|
| 19 |
pde = proc_create_single("cmdline", 0, NULL, cmdline_proc_show); |
| 20 |
pde_make_permanent(pde); |
| 21 |
pde->size = saved_command_line_len + 1; |
| 22 |
return 0; |
| 23 |
} |
| 24 |
fs_initcall(proc_cmdline_init); |