summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-07-23 17:47:44 +0000
committered <ed@FreeBSD.org>2008-07-23 17:47:44 +0000
commit6b178cd86d1b89e0750a8253263480cab5f10928 (patch)
tree1bd233c2f53f8d0bd0e2e97c8dea18a7ab1ab3b8 /sys/compat
parentfea35767ddb3f5721670fd3cd4782833964eb7bb (diff)
downloadFreeBSD-src-6b178cd86d1b89e0750a8253263480cab5f10928.zip
FreeBSD-src-6b178cd86d1b89e0750a8253263480cab5f10928.tar.gz
Add TIOCPKT and TIOCSPTLCK to the Linuxolator.
We're very lucky, because the flags used by our TIOCPKT implementation are the same as flags used by Linux. We can safely enable TIOCPKT, assuming EXTPROC is not used. TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in our implementation, make this ioctl a no-op. Approved by: philip (mentor, implicit), rdivacky Obtained from: P4 (//depot/projects/mpsafetty/...)
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ioctl.c9
-rw-r--r--sys/compat/linux/linux_ioctl.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 8e42ec1..9364c41 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -893,7 +893,10 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
break;
}
- /* LINUX_TIOCPKT */
+ case LINUX_TIOCPKT:
+ args->cmd = TIOCPKT;
+ error = (ioctl(td, (struct ioctl_args *)args));
+ break;
case LINUX_FIONBIO:
args->cmd = FIONBIO;
@@ -993,6 +996,10 @@ linux_ioctl_termio(struct thread *td, struct linux_ioctl_args *args)
sizeof(int));
break;
}
+ case LINUX_TIOCSPTLCK:
+ /* Our unlockpt() does nothing. */
+ error = 0;
+ break;
default:
error = ENOIOCTL;
break;
diff --git a/sys/compat/linux/linux_ioctl.h b/sys/compat/linux/linux_ioctl.h
index 2302a8c..2192127 100644
--- a/sys/compat/linux/linux_ioctl.h
+++ b/sys/compat/linux/linux_ioctl.h
@@ -368,6 +368,7 @@
#define LINUX_TIOCCBRK 0x5428
#define LINUX_TIOCGPTN 0x5430
+#define LINUX_TIOCSPTLCK 0x5431
#define LINUX_FIONCLEX 0x5450
#define LINUX_FIOCLEX 0x5451
OpenPOWER on IntegriCloud