aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/consoles.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/consoles.c')
-rw-r--r--fs/proc/consoles.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/proc/consoles.c b/fs/proc/consoles.c
index b701eaa482bf..51942d5abcec 100644
--- a/fs/proc/consoles.c
+++ b/fs/proc/consoles.c
@@ -29,7 +29,6 @@ static int show_console_dev(struct seq_file *m, void *v)
29 char flags[ARRAY_SIZE(con_flags) + 1]; 29 char flags[ARRAY_SIZE(con_flags) + 1];
30 struct console *con = v; 30 struct console *con = v;
31 unsigned int a; 31 unsigned int a;
32 int len;
33 dev_t dev = 0; 32 dev_t dev = 0;
34 33
35 if (con->device) { 34 if (con->device) {
@@ -47,11 +46,10 @@ static int show_console_dev(struct seq_file *m, void *v)
47 con_flags[a].name : ' '; 46 con_flags[a].name : ' ';
48 flags[a] = 0; 47 flags[a] = 0;
49 48
50 seq_printf(m, "%s%d%n", con->name, con->index, &len); 49 seq_setwidth(m, 21 - 1);
51 len = 21 - len; 50 seq_printf(m, "%s%d", con->name, con->index);
52 if (len < 1) 51 seq_pad(m, ' ');
53 len = 1; 52 seq_printf(m, "%c%c%c (%s)", con->read ? 'R' : '-',
54 seq_printf(m, "%*c%c%c%c (%s)", len, ' ', con->read ? 'R' : '-',
55 con->write ? 'W' : '-', con->unblank ? 'U' : '-', 53 con->write ? 'W' : '-', con->unblank ? 'U' : '-',
56 flags); 54 flags);
57 if (dev) 55 if (dev)