[PATCH] Clean up old names in tty code to current names

Jon Smirl
2006-07-10T04:11:14Z

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

Fix various places in the tty code to make it match the current naming system.

--
Jon Smirl
jonsmirl@gmail.com

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>

diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 34dd4c3..af43f37 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -279,7 +279,7 @@ static void __init legacy_pty_init(void)

pty_slave_driver->owner = THIS_MODULE;
pty_slave_driver->driver_name = "pty_slave";
- pty_slave_driver->name = "ttyp";
+ pty_slave_driver->name = "pts";
pty_slave_driver->major = PTY_SLAVE_MAJOR;
pty_slave_driver->minor_start = 0;
pty_slave_driver->type = TTY_DRIVER_TYPE_PTY;
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index bfdb902..4a83e94 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3245,7 +3245,7 @@ #endif
#ifdef CONFIG_VT
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
- register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
+ register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/tty0") < 0)
panic("Couldn't register /dev/tty0 driver\n");
class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index da7e66a..a627e8b 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2662,6 +2662,7 @@ int __init vty_init(void)
if (!console_driver)
panic("Couldn't allocate console driver\n");
console_driver->owner = THIS_MODULE;
+ console_driver->driver_name = "vtconsole";
console_driver->name = "tty";
console_driver->name_base = 1;
console_driver->major = TTY_MAJOR;
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 15c4455..042aefe 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -48,7 +48,7 @@ static void show_tty_range(struct seq_fi
seq_printf(m, ":vtmaster");
break;
case TTY_DRIVER_TYPE_CONSOLE:
- seq_printf(m, "console");
+ seq_printf(m, "vt:console");
break;
case TTY_DRIVER_TYPE_SERIAL:
seq_printf(m, "serial");
@@ -84,10 +84,10 @@ static int show_tty_driver(struct seq_fi
#ifdef CONFIG_UNIX98_PTYS
seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx");
seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2);
- seq_printf(m, "system\n");
+ seq_printf(m, "system:/dev/ptmx\n");
#endif
#ifdef CONFIG_VT
- seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0");
+ seq_printf(m, "%-20s /dev/%-8s ", "/dev/tty0", "tty0");
seq_printf(m, "%3d %7d ", TTY_MAJOR, 0);
seq_printf(m, "system:vtmaster\n");
#endif

[-- Attachment #2: cleanup-tty-naming.patch --]
[-- Type: text/x-patch, Size: 2365 bytes --]

diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 34dd4c3..af43f37 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -279,7 +279,7 @@ static void __init legacy_pty_init(void)

pty_slave_driver->owner = THIS_MODULE;
pty_slave_driver->driver_name = "pty_slave";
- pty_slave_driver->name = "ttyp";
+ pty_slave_driver->name = "pts";
pty_slave_driver->major = PTY_SLAVE_MAJOR;
pty_slave_driver->minor_start = 0;
pty_slave_driver->type = TTY_DRIVER_TYPE_PTY;
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index bfdb902..4a83e94 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3245,7 +3245,7 @@ #endif
#ifdef CONFIG_VT
cdev_init(&vc0_cdev, &console_fops);
if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
- register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
+ register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/tty0") < 0)
panic("Couldn't register /dev/tty0 driver\n");
class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index da7e66a..a627e8b 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2662,6 +2662,7 @@ int __init vty_init(void)
if (!console_driver)
panic("Couldn't allocate console driver\n");
console_driver->owner = THIS_MODULE;
+ console_driver->driver_name = "vtconsole";
console_driver->name = "tty";
console_driver->name_base = 1;
console_driver->major = TTY_MAJOR;
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 15c4455..042aefe 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -48,7 +48,7 @@ static void show_tty_range(struct seq_fi
seq_printf(m, ":vtmaster");
break;
case TTY_DRIVER_TYPE_CONSOLE:
- seq_printf(m, "console");
+ seq_printf(m, "vt:console");
break;
case TTY_DRIVER_TYPE_SERIAL:
seq_printf(m, "serial");
@@ -84,10 +84,10 @@ static int show_tty_driver(struct seq_fi
#ifdef CONFIG_UNIX98_PTYS
seq_printf(m, "%-20s /dev/%-8s ", "/dev/ptmx", "ptmx");
seq_printf(m, "%3d %7d ", TTYAUX_MAJOR, 2);
- seq_printf(m, "system\n");
+ seq_printf(m, "system:/dev/ptmx\n");
#endif
#ifdef CONFIG_VT
- seq_printf(m, "%-20s /dev/%-8s ", "/dev/vc/0", "vc/0");
+ seq_printf(m, "%-20s /dev/%-8s ", "/dev/tty0", "tty0");
seq_printf(m, "%3d %7d ", TTY_MAJOR, 0);
seq_printf(m, "system:vtmaster\n");
#endif