git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
fs
/
proc
/
proc_tty.c
diff --git
a/fs/proc/proc_tty.c
b/fs/proc/proc_tty.c
index
a0d4404
..
93cbcba
100644
(file)
--- a/
fs/proc/proc_tty.c
+++ b/
fs/proc/proc_tty.c
@@
-15,9
+15,6
@@
#include <linux/seq_file.h>
#include <asm/bitops.h>
#include <linux/seq_file.h>
#include <asm/bitops.h>
-extern struct tty_ldisc ldiscs[];
-
-
static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data);
static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data);
@@
-159,12
+156,15
@@
static int tty_ldiscs_read_proc(char *page, char **start, off_t off,
int i;
int len = 0;
off_t begin = 0;
int i;
int len = 0;
off_t begin = 0;
-
+ struct tty_ldisc *ld;
+
for (i=0; i < NR_LDISCS; i++) {
for (i=0; i < NR_LDISCS; i++) {
- if (!(ldiscs[i].flags & LDISC_FLAG_DEFINED))
+ ld = tty_ldisc_get(i);
+ if (ld == NULL)
continue;
len += sprintf(page+len, "%-10s %2d\n",
continue;
len += sprintf(page+len, "%-10s %2d\n",
- ldiscs[i].name ? ldiscs[i].name : "???", i);
+ ld->name ? ld->name : "???", i);
+ tty_ldisc_put(i);
if (len+begin > off+count)
break;
if (len+begin < off) {
if (len+begin > off+count)
break;
if (len+begin < off) {