blob: fa762c5fbcb28760dcea21953dc7a42938e2443a [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Alexey Dobriyancf9887f2008-10-04 14:13:59 +04002#include <linux/fs.h>
3#include <linux/init.h>
4#include <linux/proc_fs.h>
5#include <linux/seq_file.h>
6
7static int cmdline_proc_show(struct seq_file *m, void *v)
8{
Alexey Dobriyan58c501a2018-04-10 16:32:01 -07009 seq_puts(m, saved_command_line);
10 seq_putc(m, '\n');
Alexey Dobriyancf9887f2008-10-04 14:13:59 +040011 return 0;
12}
13
Alexey Dobriyancf9887f2008-10-04 14:13:59 +040014static int __init proc_cmdline_init(void)
15{
Christoph Hellwig3f3942a2018-05-15 15:57:23 +020016 proc_create_single("cmdline", 0, NULL, cmdline_proc_show);
Alexey Dobriyancf9887f2008-10-04 14:13:59 +040017 return 0;
18}
Paul Gortmakerabaf3782014-01-23 15:55:45 -080019fs_initcall(proc_cmdline_init);