aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-09-10 12:05:47 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-09-10 12:05:47 +0000
commitb03a0c9e5eba38bc37e9ee8264a946ef7e2969c9 (patch)
tree764b7ba18d469d51f10c275c9439d04824f20360 /sys
parent7c483fee3f7b980ef024883fc4599170aa3df572 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty.c2
-rw-r--r--sys/sys/tty.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 8d56bb3ce0b3..1095864aa5e6 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -2528,7 +2528,7 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS)
SLIST_FOREACH(tp, &tty_list, t_list) {
t = *tp;
if (t.t_dev)
- t.t_dev = (dev_t)dev2udev(t.t_dev);
+ t.ttyu.t_udev = dev2udev(t.t_dev);
error = SYSCTL_OUT(req, (caddr_t)&t, sizeof(t));
if (error)
return (error);
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index f8ee4fc43f9c..82f79f31a2af 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -74,7 +74,11 @@ struct tty {
struct clist t_outq; /* Device output queue. */
long t_outcc; /* Output queue statistics. */
int t_line; /* Interface to device drivers. */
- dev_t t_dev; /* Device. */
+ union {
+ dev_t t_kdev; /* Device. */
+ udev_t t_udev; /* Userland (sysctl) instance */
+ void *t_devp; /* Keep user/kernel size in sync */
+ } ttyu;
int t_state; /* Device and driver (TS*) state. */
int t_flags; /* Tty flags. */
int t_timeout; /* Timeout for ttywait() */
@@ -105,6 +109,7 @@ struct tty {
SLIST_ENTRY(tty) t_list; /* Global chain of ttys for pstat(8) */
};
+#define t_dev ttyu.t_kdev
#define t_cc t_termios.c_cc
#define t_cflag t_termios.c_cflag
#define t_iflag t_termios.c_iflag