7 #include <asm/uaccess.h>
8 #include <linux/module.h>
10 #include <linux/errno.h>
11 #include <linux/time.h>
13 #include <linux/stat.h>
14 #include <linux/tty.h>
16 #include <linux/bitops.h>
33 MINOR(from) + num - 1);
67 static int show_tty_driver(
struct seq_file *m,
void *
v)
75 seq_printf(m,
"%-20s /dev/%-8s ",
"/dev/tty",
"tty");
78 seq_printf(m,
"%-20s /dev/%-8s ",
"/dev/console",
"console");
81 #ifdef CONFIG_UNIX98_PTYS
82 seq_printf(m,
"%-20s /dev/%-8s ",
"/dev/ptmx",
"ptmx");
87 seq_printf(m,
"%-20s /dev/%-8s ",
"/dev/vc/0",
"vc/0");
95 show_tty_range(m, p, from, next - from);
99 show_tty_range(m, p, from, to - from);
104 static void *t_start(
struct seq_file *m, loff_t *
pos)
110 static void *t_next(
struct seq_file *m,
void *v, loff_t *
pos)
115 static void t_stop(
struct seq_file *m,
void *v)
124 .show = show_tty_driver
129 return seq_open(file, &tty_drivers_op);
133 .open = tty_drivers_open,
148 !driver->
ops->proc_fops)
152 driver->
ops->proc_fops, driver);
188 proc_create(
"tty/drivers", 0,
NULL, &proc_tty_drivers_operations);