From b3506a09d15dc5aee6d4bb88d759b157016e1864 Mon Sep 17 00:00:00 2001 From: "Andries E. Brouwer" Date: Tue, 1 Apr 2003 04:42:46 -0800 Subject: [PATCH] [PATCH] kill TIOCTTYGSTRUCT Only used for (dubious) debugging purposes, and exposes internal kernel state. --- drivers/char/tty_io.c | 10 ---------- include/asm-alpha/ioctls.h | 1 - include/asm-arm/ioctls.h | 1 - include/asm-cris/ioctls.h | 1 - include/asm-i386/ioctls.h | 4 ++-- include/asm-ia64/ioctls.h | 1 - include/asm-m68k/ioctls.h | 1 - include/asm-mips/ioctls.h | 14 ++++++-------- include/asm-mips64/ioctls.h | 14 ++++++-------- include/asm-parisc/ioctls.h | 1 - include/asm-ppc/ioctls.h | 1 - include/asm-ppc/termios.h | 1 - include/asm-ppc64/ioctls.h | 1 - include/asm-ppc64/termios.h | 1 - include/asm-s390/ioctls.h | 1 - include/asm-s390x/ioctls.h | 1 - include/asm-sh/ioctls.h | 1 - include/asm-sparc/ioctls.h | 1 - include/asm-sparc64/ioctls.h | 1 - include/asm-v850/ioctls.h | 1 - include/asm-x86_64/ioctls.h | 1 - 21 files changed, 14 insertions(+), 45 deletions(-) diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 0a92111694cf4..f3c2f35381aca 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1662,13 +1662,6 @@ static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t * return put_user(real_tty->session, arg); } -static int tiocttygstruct(struct tty_struct *tty, struct tty_struct *arg) -{ - if (copy_to_user(arg, tty, sizeof(*arg))) - return -EFAULT; - return 0; -} - static int tiocsetd(struct tty_struct *tty, int *arg) { int ldisc; @@ -1795,9 +1788,6 @@ int tty_ioctl(struct inode * inode, struct file * file, case TIOCLINUX: return tioclinux(tty, arg); #endif - case TIOCTTYGSTRUCT: - return tiocttygstruct(tty, (struct tty_struct *) arg); - /* * Break handling */ diff --git a/include/asm-alpha/ioctls.h b/include/asm-alpha/ioctls.h index a363c50ce6d75..67bb9f6fdbe45 100644 --- a/include/asm-alpha/ioctls.h +++ b/include/asm-alpha/ioctls.h @@ -86,7 +86,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-arm/ioctls.h b/include/asm-arm/ioctls.h index ba9c7d81d24e2..bb9a7aa10c12e 100644 --- a/include/asm-arm/ioctls.h +++ b/include/asm-arm/ioctls.h @@ -43,7 +43,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-cris/ioctls.h b/include/asm-cris/ioctls.h index 21957ec44d7ee..1628ad265a898 100644 --- a/include/asm-cris/ioctls.h +++ b/include/asm-cris/ioctls.h @@ -45,7 +45,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-i386/ioctls.h b/include/asm-i386/ioctls.h index ea0e6ae58c299..f962fadab0fad 100644 --- a/include/asm-i386/ioctls.h +++ b/include/asm-i386/ioctls.h @@ -43,14 +43,14 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ +/* #define TIOCTTYGSTRUCT 0x5426 - Former debugging-only ioctl */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ +#define FIONCLEX 0x5450 #define FIOCLEX 0x5451 #define FIOASYNC 0x5452 #define TIOCSERCONFIG 0x5453 diff --git a/include/asm-ia64/ioctls.h b/include/asm-ia64/ioctls.h index e727e4a671896..85c740bd4d19e 100644 --- a/include/asm-ia64/ioctls.h +++ b/include/asm-ia64/ioctls.h @@ -48,7 +48,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-m68k/ioctls.h b/include/asm-m68k/ioctls.h index 89c0df1262edf..0c48929ab444e 100644 --- a/include/asm-m68k/ioctls.h +++ b/include/asm-m68k/ioctls.h @@ -43,7 +43,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-mips/ioctls.h b/include/asm-mips/ioctls.h index 1b238a9acd28e..1fd384f2bc134 100644 --- a/include/asm-mips/ioctls.h +++ b/include/asm-mips/ioctls.h @@ -74,6 +74,12 @@ /* #define TIOCSETD _IOW('t', 27, int) set line discipline */ /* 127-124 compat */ +#define TIOCSBRK 0x5427 /* BSD compatibility */ +#define TIOCCBRK 0x5428 /* BSD compatibility */ +#define TIOCGSID 0x7416 /* Return the session ID of FD */ +#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ +#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ + /* I hope the range from 0x5480 on is free ... */ #define TIOCSCTTY 0x5480 /* become controlling tty */ #define TIOCGSOFTCAR 0x5481 @@ -81,15 +87,7 @@ #define TIOCLINUX 0x5483 #define TIOCGSERIAL 0x5484 #define TIOCSSERIAL 0x5485 - #define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5487 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x7416 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - #define TIOCSERCONFIG 0x5488 #define TIOCSERGWILD 0x5489 #define TIOCSERSWILD 0x548a diff --git a/include/asm-mips64/ioctls.h b/include/asm-mips64/ioctls.h index 1b238a9acd28e..1fd384f2bc134 100644 --- a/include/asm-mips64/ioctls.h +++ b/include/asm-mips64/ioctls.h @@ -74,6 +74,12 @@ /* #define TIOCSETD _IOW('t', 27, int) set line discipline */ /* 127-124 compat */ +#define TIOCSBRK 0x5427 /* BSD compatibility */ +#define TIOCCBRK 0x5428 /* BSD compatibility */ +#define TIOCGSID 0x7416 /* Return the session ID of FD */ +#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ +#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ + /* I hope the range from 0x5480 on is free ... */ #define TIOCSCTTY 0x5480 /* become controlling tty */ #define TIOCGSOFTCAR 0x5481 @@ -81,15 +87,7 @@ #define TIOCLINUX 0x5483 #define TIOCGSERIAL 0x5484 #define TIOCSSERIAL 0x5485 - #define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5487 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x7416 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - #define TIOCSERCONFIG 0x5488 #define TIOCSERGWILD 0x5489 #define TIOCSERSWILD 0x548a diff --git a/include/asm-parisc/ioctls.h b/include/asm-parisc/ioctls.h index 7b559dc2c253d..ee84e4172c360 100644 --- a/include/asm-parisc/ioctls.h +++ b/include/asm-parisc/ioctls.h @@ -43,7 +43,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ diff --git a/include/asm-ppc/ioctls.h b/include/asm-ppc/ioctls.h index e700d29fd47e0..f5b7f2b055e77 100644 --- a/include/asm-ppc/ioctls.h +++ b/include/asm-ppc/ioctls.h @@ -83,7 +83,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-ppc/termios.h b/include/asm-ppc/termios.h index e9c7434dafe55..f40419842fb97 100644 --- a/include/asm-ppc/termios.h +++ b/include/asm-ppc/termios.h @@ -97,7 +97,6 @@ struct ltchars { #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 diff --git a/include/asm-ppc64/ioctls.h b/include/asm-ppc64/ioctls.h index ae5da96000adb..48796bf3e4fc2 100644 --- a/include/asm-ppc64/ioctls.h +++ b/include/asm-ppc64/ioctls.h @@ -90,7 +90,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-ppc64/termios.h b/include/asm-ppc64/termios.h index bbe356d9ab6a5..02c3d283aa62b 100644 --- a/include/asm-ppc64/termios.h +++ b/include/asm-ppc64/termios.h @@ -152,7 +152,6 @@ struct termio { #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 diff --git a/include/asm-s390/ioctls.h b/include/asm-s390/ioctls.h index db7b0a0c36c80..07e19b2dd73fd 100644 --- a/include/asm-s390/ioctls.h +++ b/include/asm-s390/ioctls.h @@ -51,7 +51,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-s390x/ioctls.h b/include/asm-s390x/ioctls.h index db7b0a0c36c80..07e19b2dd73fd 100644 --- a/include/asm-s390x/ioctls.h +++ b/include/asm-s390x/ioctls.h @@ -51,7 +51,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h index f535202e8380d..1866f3f900282 100644 --- a/include/asm-sh/ioctls.h +++ b/include/asm-sh/ioctls.h @@ -75,7 +75,6 @@ #define TIOCSETD _IOW('T', 35, int) /* 0x5423 */ #define TIOCGETD _IOR('T', 36, int) /* 0x5424 */ #define TCSBRKP _IOW('T', 37, int) /* 0x5425 */ /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT _IOR('T', 38, struct tty_struct) /* 0x5426 */ /* For debugging only */ #define TIOCSBRK _IO('T', 39) /* 0x5427 */ /* BSD compatibility */ #define TIOCCBRK _IO('T', 40) /* 0x5428 */ /* BSD compatibility */ #define TIOCGSID _IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */ diff --git a/include/asm-sparc/ioctls.h b/include/asm-sparc/ioctls.h index 531460ef91ff0..bdf77b0dfd8e5 100644 --- a/include/asm-sparc/ioctls.h +++ b/include/asm-sparc/ioctls.h @@ -99,7 +99,6 @@ #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TCSBRKP 0x5425 -#define TIOCTTYGSTRUCT 0x5426 #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 #define TIOCSERSWILD 0x5455 diff --git a/include/asm-sparc64/ioctls.h b/include/asm-sparc64/ioctls.h index 0c8068dc32a91..2223b6d0e5ed8 100644 --- a/include/asm-sparc64/ioctls.h +++ b/include/asm-sparc64/ioctls.h @@ -100,7 +100,6 @@ #define TIOCGSERIAL 0x541E #define TIOCSSERIAL 0x541F #define TCSBRKP 0x5425 -#define TIOCTTYGSTRUCT 0x5426 #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 #define TIOCSERSWILD 0x5455 diff --git a/include/asm-v850/ioctls.h b/include/asm-v850/ioctls.h index a765e0a3de7f5..05c0dc9ce1ea8 100644 --- a/include/asm-v850/ioctls.h +++ b/include/asm-v850/ioctls.h @@ -43,7 +43,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ diff --git a/include/asm-x86_64/ioctls.h b/include/asm-x86_64/ioctls.h index 43a25b745626a..62caf8b6e4e17 100644 --- a/include/asm-x86_64/ioctls.h +++ b/include/asm-x86_64/ioctls.h @@ -43,7 +43,6 @@ #define TIOCSETD 0x5423 #define TIOCGETD 0x5424 #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ #define TIOCSBRK 0x5427 /* BSD compatibility */ #define TIOCCBRK 0x5428 /* BSD compatibility */ #define TIOCGSID 0x5429 /* Return the session ID of FD */ -- 2.53.0