summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/cx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/isa/cx.c')
-rw-r--r--sys/i386/isa/cx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/i386/isa/cx.c b/sys/i386/isa/cx.c
index c0fc028..fd5b686 100644
--- a/sys/i386/isa/cx.c
+++ b/sys/i386/isa/cx.c
@@ -285,11 +285,11 @@ cxioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
master = *o->master ? ifunit (o->master) : c->ifp;
if (! master)
return (EINVAL);
- m = cxchan[master->if_unit];
+ m = cxchan[master->if_dunit];
/* Leave the previous master queue. */
if (c->master != c->ifp) {
- cx_chan_t *p = cxchan[c->master->if_unit];
+ cx_chan_t *p = cxchan[c->master->if_dunit];
for (; p; p=p->slaveq)
if (p->slaveq == c)
@@ -355,9 +355,8 @@ cxioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
case 8: o->iftype = c->board->if8type; break;
}
if (c->master != c->ifp)
- snprintf (o->master, sizeof(o->master),
- "%s%d", c->master->if_name,
- c->master->if_unit);
+ strlcpy(o->master, c->master->if_xname,
+ sizeof(o->master));
else
*o->master = 0;
break;
OpenPOWER on IntegriCloud