diff options
author | ache <ache@FreeBSD.org> | 1995-04-11 17:58:09 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-04-11 17:58:09 +0000 |
commit | 2486829178bd34f24d3ab805a52b97ac14487776 (patch) | |
tree | 5a6610e87b8380d193989c0d6fc4bc1303649cf2 | |
parent | a569d0b92cb34fd85f0acd7224bedbf6c02521dd (diff) | |
download | FreeBSD-src-2486829178bd34f24d3ab805a52b97ac14487776.zip FreeBSD-src-2486829178bd34f24d3ab805a52b97ac14487776.tar.gz |
Call new ttsetcompat() function for proper working
old v7 ioctls with locking bits.
-rw-r--r-- | sys/dev/sio/sio.c | 10 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 10 | ||||
-rw-r--r-- | sys/isa/sio.c | 10 |
3 files changed, 27 insertions, 3 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 1e33122..f03bdbd 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.87 1995/04/03 10:29:14 ache Exp $ + * $Id: sio.c,v 1.88 1995/04/04 16:26:04 ache Exp $ */ #include "sio.h" @@ -1262,11 +1262,19 @@ sioioctl(dev, cmd, data, flag, p) int s; int tiocm_xxx; struct tty *tp; + struct termios term; + int oldcmd; mynor = minor(dev); com = com_addr(MINOR_TO_UNIT(mynor)); iobase = com->iobase; tp = com->tp; + term = tp->t_termios; + oldcmd = cmd; + if ((error = ttsetcompat(tp, &cmd, data, &term)) != 0) + return error; + if (cmd != oldcmd) + data = (caddr_t)&term; if (mynor & CONTROL_MASK) { struct termios *ct; diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 1e33122..f03bdbd 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.87 1995/04/03 10:29:14 ache Exp $ + * $Id: sio.c,v 1.88 1995/04/04 16:26:04 ache Exp $ */ #include "sio.h" @@ -1262,11 +1262,19 @@ sioioctl(dev, cmd, data, flag, p) int s; int tiocm_xxx; struct tty *tp; + struct termios term; + int oldcmd; mynor = minor(dev); com = com_addr(MINOR_TO_UNIT(mynor)); iobase = com->iobase; tp = com->tp; + term = tp->t_termios; + oldcmd = cmd; + if ((error = ttsetcompat(tp, &cmd, data, &term)) != 0) + return error; + if (cmd != oldcmd) + data = (caddr_t)&term; if (mynor & CONTROL_MASK) { struct termios *ct; diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 1e33122..f03bdbd 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.87 1995/04/03 10:29:14 ache Exp $ + * $Id: sio.c,v 1.88 1995/04/04 16:26:04 ache Exp $ */ #include "sio.h" @@ -1262,11 +1262,19 @@ sioioctl(dev, cmd, data, flag, p) int s; int tiocm_xxx; struct tty *tp; + struct termios term; + int oldcmd; mynor = minor(dev); com = com_addr(MINOR_TO_UNIT(mynor)); iobase = com->iobase; tp = com->tp; + term = tp->t_termios; + oldcmd = cmd; + if ((error = ttsetcompat(tp, &cmd, data, &term)) != 0) + return error; + if (cmd != oldcmd) + data = (caddr_t)&term; if (mynor & CONTROL_MASK) { struct termios *ct; |