Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/virtio viocon(4): Fix tty device number.
details: https://anonhg.NetBSD.org/src/rev/2c379ace18c2
branches: trunk
changeset: 368930:2c379ace18c2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Aug 13 16:52:29 2022 +0000
description:
viocon(4): Fix tty device number.
diffstat:
sys/dev/virtio/viocon.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 8958c6e2fe08 -r 2c379ace18c2 sys/dev/virtio/viocon.c
--- a/sys/dev/virtio/viocon.c Sat Aug 13 16:44:11 2022 +0000
+++ b/sys/dev/virtio/viocon.c Sat Aug 13 16:52:29 2022 +0000
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: viocon.c,v 1.1 2022/08/12 11:15:42 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: viocon.c,v 1.2 2022/08/13 16:52:29 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -93,6 +93,8 @@
#define BUFSIZE 128
+#define VIOCONDEV(u,p) makedev(cdevsw_lookup_major(&viocon_cdevsw), \
+ ((u) << 4) | (p))
#define VIOCONUNIT(x) (minor(x) >> 4)
#define VIOCONPORT(x) (minor(x) & 0x0f)
@@ -307,7 +309,7 @@
tp->t_oproc = vioconstart;
tp->t_param = vioconparam;
tp->t_hwiflow = vioconhwiflow;
- tp->t_dev = (device_unit(sc->sc_dev) << 4) | portidx;
+ tp->t_dev = VIOCONDEV(device_unit(sc->sc_dev), portidx);
vp->vp_tty = tp;
DPRINTF("%s: tty: %p\n", __func__, tp);
Home |
Main Index |
Thread Index |
Old Index