Remove unsupported legacy TIOC[GS]ET[PC] ioctls

This commit is contained in:
David van Moolenbroek 2012-03-17 14:14:59 +01:00
parent 6af9856d4a
commit 91a1d11c11
3 changed files with 14 additions and 111 deletions

View file

@ -17,18 +17,6 @@
PRIVATE int get_request;
PRIVATE char *rnames[] = {
"TIOCGETP",
"TIOCSETP",
"TIOCGETC",
"TIOCSETC"
};
#define GETPNAME 0
#define SETPNAME 1
#define GETCNAME 2
#define SETCNAME 3
/*
* decode ioctl call
* send or receive = 'R' or 'S'
@ -37,12 +25,9 @@ void decode_ioctl(sr, m)
int sr;
message *m;
{
int rq;
int request, device;
int high;
long spek, flags;
int ispeed, ospeed, speed, erase, kill;
int t_intrc, t_quitc, t_startc, t_stopc, t_brk, t_eof;
device = m->m2_i1;
request = m->m2_i3;
@ -60,86 +45,22 @@ int t_intrc, t_quitc, t_startc, t_stopc, t_brk, t_eof;
if ( sr == 'R') request = get_request;
switch(request) {
case TIOCGETP:
case TIOCSETP:
rq = (request == TIOCGETP) ? GETPNAME : SETPNAME;
if (sr == 'S') {
get_request = request;
Printf( "Sending %s ",rnames[rq] );
if ( request == TIOCGETP ) break;
}
if ( (sr == 'R') && (request == TIOCSETP) ) break;
erase = (spek >> 8) & BYTE;
kill = spek & BYTE;
flags = flags & 0xFFFF;
speed = (spek >> 16) & 0xFFFFL;
ispeed = speed & BYTE;
ospeed = (speed >> 8) & BYTE;
Printf("%s erase=%d kill=%d speed=%d/%d flags=%lx ",
rnames[rq], erase, kill, ispeed, ospeed, flags);
break;
case TIOCGETC:
case TIOCSETC:
rq = (request == TIOCGETC) ? GETCNAME : SETCNAME;
if (sr == 'S') {
get_request = request;
Printf( "Sending %s ",rnames[rq] );
if ( request == TIOCGETC ) break;
}
if ( (sr == 'R') && (request == TIOCSETC) ) break;
t_intrc = (spek >> 24) & BYTE;
t_quitc = (spek >> 16) & BYTE;
t_startc = (spek >> 8) & BYTE;
t_stopc = (spek >> 0) & BYTE;
t_brk = flags & BYTE;
t_eof = (flags >> 8 ) & BYTE;
Printf("%s int %d quit %d start %d stop %d brk %d eof %d\n",
rnames[rq],
t_intrc, t_quitc, t_startc, t_stopc, t_brk, t_eof);
break;
default:
#ifdef __i86 /* 16 bit */
if ( sr == 'S' ) {
Printf("Sending ");
get_request = request;
}
else
Printf("Receiving ");
if ( sr == 'S' ) {
Printf("Sending (%lx) ", request);
get_request = request;
}
else
Printf("Receiving (%lx) ", request);
Printf("Other IOCTL device=%d request=%c|%d\n",
device, (request >> 8) & BYTE, request & BYTE );
high = ( request & 0xFFFF0000 ) >> 16 ;
request &= _IOCTYPE_MASK;
break;
#endif
#ifdef __i386 /* 32 bit encoding */
if ( sr == 'S' ) {
Printf("Sending (%lx) ", request);
get_request = request;
}
else
Printf("Receiving (%lx) ", request);
high = ( request & 0xFFFF0000 ) >> 16 ;
request &= _IOCTYPE_MASK;
Printf("Other IOCTL device=%d request=%c|%d flags=%x size =%d\n",
device, (request >> 8) & BYTE, request & BYTE,
(high & ~_IOCPARM_MASK ),
(high & _IOCPARM_MASK )
);
break;
#endif
}
Printf("\n");
Printf("Other IOCTL device=%d request=%c|%d flags=%x size =%d\n",
device, (request >> 8) & BYTE, request & BYTE,
(high & ~_IOCPARM_MASK ),
(high & _IOCPARM_MASK )
);
Printf("\n");
}

View file

@ -25,12 +25,6 @@
#define TIOCSFON_OLD _IOW('T', 20, u8_t [8192])
#define TIOCSFON _IOW_BIG(1, u8_t [8192])
/* Legacy <sgtty.h> */
#define TIOCGETP _IOR('t', 1, struct sgttyb)
#define TIOCSETP _IOW('t', 2, struct sgttyb)
#define TIOCGETC _IOR('t', 3, struct tchars)
#define TIOCSETC _IOW('t', 4, struct tchars)
/* Keyboard ioctls. */
#define KIOCBELL _IOW('k', 1, struct kio_bell)
#define KIOCSLEDS _IOW('k', 2, struct kio_leds)

View file

@ -712,18 +712,6 @@ set to
tty input queue to be sent to the pty reader as backspace overstrikes. Some
of this output may get lost if the pty reader cannot accept it all at once
in a single read call.)
.SS "Backwards compatibility"
The
.BR TIOCGETP ,
.BR TIOCSETP ,
.BR TIOCGETC
and
.BR TIOCSETC
ioctl functions that are used by the old
.B sgtty
terminal interface are still supported by the terminal driver by emulation.
Note that these old functions cannot control all termios attributes, so the
terminal must be in a relatively sane state to avoid problems.
.SH FILES
The list below shows all devices that MINIX 3 and Minix-vmd have. Not all of
these devices are configured in by default, as indicated by the numbers