Skip to content

Commit

Permalink
proc: faster /proc/cmdline
Browse files Browse the repository at this point in the history
Use seq_puts() and skip format string processing.

Link: http://lkml.kernel.org/r/20180309222948.GB3843@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
  • Loading branch information
Alexey Dobriyan authored and ravindu755 committed Apr 4, 2024
1 parent dfbb930 commit 11fb510
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/proc/cmdline.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ static char new_command_line[COMMAND_LINE_SIZE];

static int cmdline_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "%s\n", new_command_line);
seq_puts(m, new_command_line);
seq_putc(m, '\n');
return 0;
}

Expand Down

0 comments on commit 11fb510

Please sign in to comment.