diff options
author | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:44:08 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2016-01-09 17:44:08 +0000 |
commit | a28a640f6442993bdc17d3c331fcf93820a3698b (patch) | |
tree | e8f99374f493259af7e2b73dd6e31c723dc1cfda /sys/compat | |
parent | e412c865a0881677d29c9a0bc5fa812a46f63a08 (diff) | |
download | FreeBSD-src-a28a640f6442993bdc17d3c331fcf93820a3698b.zip FreeBSD-src-a28a640f6442993bdc17d3c331fcf93820a3698b.tar.gz |
MFC r283483:
Convert signal number to native for VT_SETMODE ioctl and remove
strange and invalid ISSIGVALID macro.
The code has not been tested right way but it was originally broken.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_ioctl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index fc7fb26..3dcf13b 100644 --- a/sys/compat/linux/linux_ioctl.c +++ b/sys/compat/linux/linux_ioctl.c @@ -1976,8 +1976,6 @@ linux_ioctl_sound(struct thread *td, struct linux_ioctl_args *args) * Console related ioctls */ -#define ISSIGVALID(sig) ((sig) > 0 && (sig) < NSIG) - static int linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args) { @@ -2060,8 +2058,16 @@ linux_ioctl_console(struct thread *td, struct linux_ioctl_args *args) struct vt_mode mode; if ((error = copyin((void *)args->arg, &mode, sizeof(mode)))) break; - if (!ISSIGVALID(mode.frsig) && ISSIGVALID(mode.acqsig)) - mode.frsig = mode.acqsig; + if (LINUX_SIG_VALID(mode.relsig)) + mode.relsig = linux_to_bsd_signal(mode.relsig); + else + mode.relsig = 0; + if (LINUX_SIG_VALID(mode.acqsig)) + mode.acqsig = linux_to_bsd_signal(mode.acqsig); + else + mode.acqsig = 0; + /* XXX. Linux ignores frsig and set it to 0. */ + mode.frsig = 0; if ((error = copyout(&mode, (void *)args->arg, sizeof(mode)))) break; args->cmd = VT_SETMODE; |