lkml.org 
[lkml]   [2018]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] proc: faster /proc/cmdline
Use seq_puts() and skip format string processing.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

fs/proc/cmdline.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/proc/cmdline.c
+++ b/fs/proc/cmdline.c
@@ -6,7 +6,8 @@

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

\
 
 \ /
  Last update: 2018-03-09 23:30    [W:0.023 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site