Use the stack for temporary storage in OTIOCCONS.

The old code used the thread's pcb via the uap->data pointer.

Reviewed by:	ed
Approved by:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14674
This commit is contained in:
Brooks Davis 2018-03-12 23:04:42 +00:00
parent 405b67a225
commit 467e627672

View File

@ -262,9 +262,11 @@ tty_ioctl_compat(struct tty *tp, u_long com, caddr_t data, int fflag,
fflag, td));
}
case OTIOCCONS:
*(int *)data = 1;
return (tty_ioctl(tp, TIOCCONS, data, fflag, td));
case OTIOCCONS: {
int one = 1;
return (tty_ioctl(tp, TIOCCONS, (caddr_t)&one, fflag, td));
}
default:
return (ENOIOCTL);