diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-01-12 20:00:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 11:03:16 -0500 |
commit | 9d6de12f70d2fb1487c4f482a21fed25fe74e0fd (patch) | |
tree | a5bc7cb77c710418c44e2b1c009e80d79e12e3ab /fs/proc/proc_tty.c | |
parent | a2ade7b6ca37c808128810687cd56e8a44443e65 (diff) |
proc: use seq_puts()/seq_putc() where possible
For string without format specifiers, use seq_puts().
For seq_printf("\n"), use seq_putc('\n').
text data bss dec hex filename
61866 488 112 62466 f402 fs/proc/proc.o
61729 488 112 62329 f379 fs/proc/proc.o
----------------------------------------------------
-139
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_tty.c')
-rw-r--r-- | fs/proc/proc_tty.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index 83adcc869437..cb761f010300 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -36,27 +36,27 @@ static void show_tty_range(struct seq_file *m, struct tty_driver *p, | |||
36 | } | 36 | } |
37 | switch (p->type) { | 37 | switch (p->type) { |
38 | case TTY_DRIVER_TYPE_SYSTEM: | 38 | case TTY_DRIVER_TYPE_SYSTEM: |
39 | seq_printf(m, "system"); | 39 | seq_puts(m, "system"); |
40 | if (p->subtype == SYSTEM_TYPE_TTY) | 40 | if (p->subtype == SYSTEM_TYPE_TTY) |
41 | seq_printf(m, ":/dev/tty"); | 41 | seq_puts(m, ":/dev/tty"); |
42 | else if (p->subtype == SYSTEM_TYPE_SYSCONS) | 42 | else if (p->subtype == SYSTEM_TYPE_SYSCONS) |
43 | seq_printf(m, ":console"); | 43 | seq_puts(m, ":console"); |
44 | else if (p->subtype == SYSTEM_TYPE_CONSOLE) | 44 | else if (p->subtype == SYSTEM_TYPE_CONSOLE) |
45 | seq_printf(m, ":vtmaster"); | 45 | seq_puts(m, ":vtmaster"); |
46 | break; | 46 | break; |
47 | case TTY_DRIVER_TYPE_CONSOLE: | 47 | case TTY_DRIVER_TYPE_CONSOLE: |
48 | seq_printf(m, "console"); | 48 | seq_puts(m, "console"); |
49 | break; | 49 | break; |
50 | case TTY_DRIVER_TYPE_SERIAL: | 50 | case TTY_DRIVER_TYPE_SERIAL: |
51 | seq_printf(m, "serial"); | 51 | seq_puts(m, "serial"); |
52 | break; | 52 | break; |
53 | case TTY_DRIVER_TYPE_PTY: | 53 | case TTY_DRIVER_TYPE_PTY: |
54 | if (p->subtype == PTY_TYPE_MASTER) | 54 | if (p->subtype == PTY_TYPE_MASTER) |
55 | seq_printf(m, "pty:master"); | 55 | seq_puts(m, "pty:master"); |
56 | else if (p->subtype == PTY_TYPE_SLAVE) | 56 | else if (p->subtype == PTY_TYPE_SLAVE) |
57 | seq_printf(m, "pty:slave"); | 57 | seq_puts(m, "pty:slave"); |
58 | else | 58 | else |
59 | seq_printf(m, "pty"); | 59 | seq_puts(m, "pty"); |
60 | break; | 60 | break; |
61 | default: | 61 | default: |
62 | seq_printf(m, "type:%d.%d", p->type, p->subtype); | 62 | seq_printf(m, "type:%d.%d", p->type, p->subtype); |
@@ -74,19 +74,19 @@ static int show_tty_driver(struct seq_file *m, void *v) | |||
74 | /* pseudo-drivers first */ | 74 | /* pseudo-drivers first */ |
75 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/tty", "tty"); | 75 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/tty", "tty"); |
76 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 0); | 76 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 0); |
77 | seq_printf(m, "system:/dev/tty\n"); | 77 | seq_puts(m, "system:/dev/tty\n"); |
78 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/console", "console"); | 78 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/console", "console"); |
79 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 1); | 79 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 1); |
80 | seq_printf(m, "system:console\n"); | 80 | seq_puts(m, "system:console\n"); |
81 | #ifdef CONFIG_UNIX98_PTYS | 81 | #ifdef CONFIG_UNIX98_PTYS |
82 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx"); | 82 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx"); |
83 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2); | 83 | seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2); |
84 | seq_printf(m, "system\n"); | 84 | seq_puts(m, "system\n"); |
85 | #endif | 85 | #endif |
86 | #ifdef CONFIG_VT | 86 | #ifdef CONFIG_VT |
87 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0"); | 87 | seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0"); |
88 | seq_printf(m, "%3d %7d ", TTY_MAJOR, 0); | 88 | seq_printf(m, "%3d %7d ", TTY_MAJOR, 0); |
89 | seq_printf(m, "system:vtmaster\n"); | 89 | seq_puts(m, "system:vtmaster\n"); |
90 | #endif | 90 | #endif |
91 | } | 91 | } |
92 | 92 | ||