Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
This commit is contained in:
parent
27c20503c6
commit
239b7b699e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31577
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.55 1997/09/21 21:40:57 gibbs Exp $
|
||||
* $Id: cy.c,v 1.56 1997/11/10 15:46:33 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -1463,12 +1463,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.55 1997/09/21 21:40:57 gibbs Exp $
|
||||
* $Id: cy.c,v 1.56 1997/11/10 15:46:33 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -1463,12 +1463,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* dgb.c $Id: dgb.c,v 1.27 1997/07/01 00:22:35 bde Exp $
|
||||
* dgb.c $Id: dgb.c,v 1.28 1997/09/14 03:19:00 peter Exp $
|
||||
*
|
||||
* Digiboard driver.
|
||||
*
|
||||
@ -1688,13 +1688,13 @@ dgbioctl(dev, cmd, data, flag, p)
|
||||
port->mustdrain=1;
|
||||
|
||||
error = linesw[tp->t_line].l_ioctl(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return error;
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp,&tp->t_termios);
|
||||
port->mustdrain=0;
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
|
||||
DPRINT6(DB_PARAM,"dgb%d: port%d: dgbioctl-RES c=0x%x i=0x%x l=0x%x\n",unit,pnum,tp->t_cflag,tp->t_iflag,tp->t_lflag);
|
||||
|
@ -1097,11 +1097,11 @@ struct proc *p;
|
||||
struct tty *tp = rc->rc_tp;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, rc);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ rpioctl(dev, cmd, data, flag, p)
|
||||
t = &tp->t_termios;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if(error >= 0) {
|
||||
if(error != ENOIOCTL) {
|
||||
return(error);
|
||||
}
|
||||
oldspl = spltty();
|
||||
@ -1697,7 +1697,7 @@ rpioctl(dev, cmd, data, flag, p)
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
flags = rp->rp_channel.TxControl[3];
|
||||
rp_disc_optim(tp, &tp->t_termios, rp);
|
||||
if(error >= 0) {
|
||||
if(error != ENOIOCTL) {
|
||||
splx(oldspl);
|
||||
return(error);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
||||
*
|
||||
* $Id: si.c,v 1.60 1997/09/14 03:19:18 peter Exp $
|
||||
* $Id: si.c,v 1.61 1997/09/21 21:41:37 gibbs Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -1174,14 +1174,14 @@ siioctl(dev, cmd, data, flag, p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
goto out;
|
||||
|
||||
oldspl = spltty();
|
||||
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
si_disc_optim(tp, &tp->t_termios, pp);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
goto outspl;
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.188 1997/11/02 21:26:14 nate Exp $
|
||||
* $Id: sio.c,v 1.189 1997/11/20 15:48:41 nate Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -1730,12 +1730,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $
|
||||
* $Id: syscons.c,v 1.240 1997/11/25 12:44:44 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -1693,10 +1693,10 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
return(ENOTTY);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* dgb.c $Id: dgb.c,v 1.27 1997/07/01 00:22:35 bde Exp $
|
||||
* dgb.c $Id: dgb.c,v 1.28 1997/09/14 03:19:00 peter Exp $
|
||||
*
|
||||
* Digiboard driver.
|
||||
*
|
||||
@ -1688,13 +1688,13 @@ dgbioctl(dev, cmd, data, flag, p)
|
||||
port->mustdrain=1;
|
||||
|
||||
error = linesw[tp->t_line].l_ioctl(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return error;
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp,&tp->t_termios);
|
||||
port->mustdrain=0;
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) {
|
||||
DPRINT6(DB_PARAM,"dgb%d: port%d: dgbioctl-RES c=0x%x i=0x%x l=0x%x\n",unit,pnum,tp->t_cflag,tp->t_iflag,tp->t_lflag);
|
||||
|
@ -434,10 +434,10 @@ int cxioctl (dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#else
|
||||
error = (*linesw[tp->t_line].l_ioctl) (tp, cmd, data, flag);
|
||||
#endif
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
error = ttioctl (tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
|
||||
s = spltty ();
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.55 1997/09/21 21:40:57 gibbs Exp $
|
||||
* $Id: cy.c,v 1.56 1997/11/10 15:46:33 bde Exp $
|
||||
*/
|
||||
|
||||
#include "cy.h"
|
||||
@ -1463,12 +1463,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: istallion.c,v 1.12 1997/07/20 14:10:04 bde Exp $
|
||||
* $Id: istallion.c,v 1.13 1997/09/14 03:19:09 peter Exp $
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -1264,13 +1264,13 @@ STATIC int stliioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
* process this command (if they can).
|
||||
*/
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
|
||||
x = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
stli_ttyoptim(portp, &tp->t_termios);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(x);
|
||||
return(error);
|
||||
}
|
||||
|
@ -738,7 +738,8 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
#endif
|
||||
|
||||
#if PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200
|
||||
if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p)) >= 0)
|
||||
if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p))
|
||||
!= ENOIOCTL)
|
||||
return (error);
|
||||
#else
|
||||
if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag)) >= 0)
|
||||
@ -749,7 +750,7 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
if((error = ttioctl(tp, cmd, data, flag, p)) >= 0)
|
||||
return (error);
|
||||
#else
|
||||
if((error = ttioctl(tp, cmd, data, flag)) >= 0)
|
||||
if((error = ttioctl(tp, cmd, data, flag)) != ENOIOCTL)
|
||||
return (error);
|
||||
#endif /* PCVT_NETBSD > 9 */
|
||||
|
||||
|
@ -1097,11 +1097,11 @@ struct proc *p;
|
||||
struct tty *tp = rc->rc_tp;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, rc);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
|
||||
|
@ -1687,7 +1687,7 @@ rpioctl(dev, cmd, data, flag, p)
|
||||
t = &tp->t_termios;
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if(error >= 0) {
|
||||
if(error != ENOIOCTL) {
|
||||
return(error);
|
||||
}
|
||||
oldspl = spltty();
|
||||
@ -1697,7 +1697,7 @@ rpioctl(dev, cmd, data, flag, p)
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
flags = rp->rp_channel.TxControl[3];
|
||||
rp_disc_optim(tp, &tp->t_termios, rp);
|
||||
if(error >= 0) {
|
||||
if(error != ENOIOCTL) {
|
||||
splx(oldspl);
|
||||
return(error);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
|
||||
* NO EVENT SHALL THE AUTHORS BE LIABLE.
|
||||
*
|
||||
* $Id: si.c,v 1.60 1997/09/14 03:19:18 peter Exp $
|
||||
* $Id: si.c,v 1.61 1997/09/21 21:41:37 gibbs Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -1174,14 +1174,14 @@ siioctl(dev, cmd, data, flag, p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
goto out;
|
||||
|
||||
oldspl = spltty();
|
||||
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
si_disc_optim(tp, &tp->t_termios, pp);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
goto outspl;
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.188 1997/11/02 21:26:14 nate Exp $
|
||||
* $Id: sio.c,v 1.189 1997/11/20 15:48:41 nate Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -1730,12 +1730,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: stallion.c,v 1.12 1997/07/20 14:10:12 bde Exp $
|
||||
* $Id: stallion.c,v 1.13 1997/09/14 03:19:25 peter Exp $
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -1067,13 +1067,13 @@ STATIC int stlioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
* process this command (if they can).
|
||||
*/
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
|
||||
x = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
stl_ttyoptim(portp, &tp->t_termios);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(x);
|
||||
return(error);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $
|
||||
* $Id: syscons.c,v 1.240 1997/11/25 12:44:44 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -1693,10 +1693,10 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
return(ENOTTY);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.188 1997/11/02 21:26:14 nate Exp $
|
||||
* $Id: sio.c,v 1.189 1997/11/20 15:48:41 nate Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -1730,12 +1730,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.239 1997/11/21 11:37:05 yokota Exp $
|
||||
* $Id: syscons.c,v 1.240 1997/11/25 12:44:44 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -1693,10 +1693,10 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
return(ENOTTY);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.c 8.8 (Berkeley) 1/21/94
|
||||
* $Id: tty.c,v 1.97 1997/10/12 20:24:05 phk Exp $
|
||||
* $Id: tty.c,v 1.98 1997/11/07 08:53:01 phk Exp $
|
||||
*/
|
||||
|
||||
/*-
|
||||
@ -1027,7 +1027,7 @@ ttioctl(tp, cmd, data, flag)
|
||||
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
|
||||
return (ttcompat(tp, cmd, data, flag));
|
||||
#else
|
||||
return (-1);
|
||||
return (ENOIOCTL);
|
||||
#endif
|
||||
}
|
||||
return (0);
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_compat.c 8.1 (Berkeley) 6/10/93
|
||||
* $Id: tty_compat.c,v 1.22 1997/03/24 12:03:03 bde Exp $
|
||||
* $Id: tty_compat.c,v 1.23 1997/08/02 14:31:39 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -263,7 +263,7 @@ ttcompat(tp, com, data, flag)
|
||||
return (ttioctl(tp, TIOCCONS, data, flag));
|
||||
|
||||
default:
|
||||
return (-1);
|
||||
return (ENOIOCTL);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_conf.c 8.4 (Berkeley) 1/21/94
|
||||
* $Id$
|
||||
* $Id: tty_conf.c,v 1.10 1997/02/22 09:39:25 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -204,5 +204,5 @@ l_nullioctl(tp, cmd, data, flags, p)
|
||||
struct proc *p;
|
||||
{
|
||||
|
||||
return (-1);
|
||||
return (ENOIOCTL);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_pty.c 8.4 (Berkeley) 2/20/95
|
||||
* $Id: tty_pty.c,v 1.46 1997/09/14 02:40:45 peter Exp $
|
||||
* $Id: tty_pty.c,v 1.47 1997/09/16 11:43:32 bde Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -730,9 +730,9 @@ ptyioctl(dev, cmd, data, flag, p)
|
||||
return(0);
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error < 0)
|
||||
if (error == ENOIOCTL)
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
if (error < 0) {
|
||||
if (error == ENOIOCTL) {
|
||||
if (pti->pt_flags & PF_UCNTL &&
|
||||
(cmd & ~0xff) == UIOCCMD(0)) {
|
||||
if (cmd & 0xff) {
|
||||
|
@ -69,7 +69,7 @@
|
||||
* Paul Mackerras (paulus@cs.anu.edu.au).
|
||||
*/
|
||||
|
||||
/* $Id: if_ppp.c,v 1.49 1997/10/18 01:20:23 peter Exp $ */
|
||||
/* $Id: if_ppp.c,v 1.50 1997/11/18 13:52:41 bde Exp $ */
|
||||
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
|
||||
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
|
||||
|
||||
@ -542,7 +542,7 @@ pppioctl(sc, cmd, data, flag, p)
|
||||
#endif
|
||||
|
||||
default:
|
||||
return (-1);
|
||||
return (ENOIOCTL);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
|
||||
* $Id: if_sl.c,v 1.60 1997/09/21 22:01:03 gibbs Exp $
|
||||
* $Id: if_sl.c,v 1.61 1997/10/07 09:13:06 ache Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -444,7 +444,7 @@ sltioctl(tp, cmd, data, flag, p)
|
||||
|
||||
default:
|
||||
splx(s);
|
||||
return (-1);
|
||||
return (ENOIOCTL);
|
||||
}
|
||||
splx(s);
|
||||
return (0);
|
||||
|
@ -70,7 +70,7 @@
|
||||
* Paul Mackerras (paulus@cs.anu.edu.au).
|
||||
*/
|
||||
|
||||
/* $Id: ppp_tty.c,v 1.27 1997/10/18 01:20:28 peter Exp $ */
|
||||
/* $Id: ppp_tty.c,v 1.28 1997/11/18 14:08:51 bde Exp $ */
|
||||
|
||||
#include "ppp.h"
|
||||
#if NPPP > 0
|
||||
@ -473,7 +473,7 @@ ppptioctl(tp, cmd, data, flag, p)
|
||||
int error, s;
|
||||
|
||||
if (sc == NULL || tp != (struct tty *) sc->sc_devp)
|
||||
return -1;
|
||||
return (ENOIOCTL);
|
||||
|
||||
error = 0;
|
||||
switch (cmd) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.42 1997/11/03 02:30:45 kato Exp $
|
||||
* $Id: sio.c,v 1.43 1997/11/25 09:42:26 kato Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -2237,12 +2237,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.42 1997/11/03 02:30:45 kato Exp $
|
||||
* $Id: sio.c,v 1.43 1997/11/25 09:42:26 kato Exp $
|
||||
*/
|
||||
|
||||
#include "opt_comconsole.h"
|
||||
@ -2237,12 +2237,12 @@ sioioctl(dev, cmd, data, flag, p)
|
||||
dt->c_ospeed = tp->t_ospeed;
|
||||
}
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return (error);
|
||||
s = spltty();
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
disc_optim(tp, &tp->t_termios, com);
|
||||
if (error >= 0) {
|
||||
if (error != ENOIOCTL) {
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.63 1997/11/25 09:51:43 kato Exp $
|
||||
* $Id: syscons.c,v 1.64 1997/11/27 10:14:11 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -1974,10 +1974,10 @@ scioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
|
||||
}
|
||||
|
||||
error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
error = ttioctl(tp, cmd, data, flag);
|
||||
if (error >= 0)
|
||||
if (error != ENOIOCTL)
|
||||
return(error);
|
||||
return(ENOTTY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user