summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 8d56bb3..1095864 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 f8ee4fc..82f79f3 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
OpenPOWER on IntegriCloud