xref: /openbmc/linux/fs/proc/cmdline.c (revision eef4e616)
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->size = saved_command_line_len + 1;
21 	return 0;
22 }
23 fs_initcall(proc_cmdline_init);
24