summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_termios.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2006-09-22 15:12:02 +0000
committerchristos <christos@NetBSD.org>2006-09-22 15:12:02 +0000
commit487c57538b59c35dc58890ccc6eb54c2cf5ef51e (patch)
treea664037140624e09e5f9ea6ad6e04d542f9e4a9c /sys/compat/linux/common/linux_termios.c
parent57ee5d43402ccb3f7960e4d92ed1f3e346c8f9aa (diff)
Pretend to implement TIOCSPTLCK. Although failing is harmless, there is no
point in doing so.
Diffstat (limited to 'sys/compat/linux/common/linux_termios.c')
-rw-r--r--sys/compat/linux/common/linux_termios.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/compat/linux/common/linux_termios.c b/sys/compat/linux/common/linux_termios.c
index 1a182b3f350..8b845527a9f 100644
--- a/sys/compat/linux/common/linux_termios.c
+++ b/sys/compat/linux/common/linux_termios.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_termios.c,v 1.25 2006/02/15 09:31:17 manu Exp $ */
+/* $NetBSD: linux_termios.c,v 1.26 2006/09/22 15:12:02 christos Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.25 2006/02/15 09:31:17 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.26 2006/09/22 15:12:02 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ptm.h"
@@ -63,6 +63,12 @@ __KERNEL_RCSID(0, "$NetBSD: linux_termios.c,v 1.25 2006/02/15 09:31:17 manu Exp
#include <compat/linux/linux_syscallargs.h>
+#ifdef DEBUG_LINUX
+#define DPRINTF(a) uprintf a
+#else
+#define DPRINTF(a)
+#endif
+
int
linux_ioctl_termios(l, uap, retval)
struct lwp *l;
@@ -340,6 +346,15 @@ linux_ioctl_termios(l, uap, retval)
}
#endif /* NO_DEV_PTM */
#endif /* LINUX_TIOCGPTN */
+#ifdef LINUX_TIOCSPTLCK
+ case LINUX_TIOCSPTLCK:
+ FILE_UNUSE(fp, l);
+ error = copyin(SCARG(uap, data), &idat, sizeof(idat));
+ if (error)
+ return error;
+ DPRINTF(("TIOCSPTLCK %d\n", idat));
+ return 0;
+#endif
default:
error = EINVAL;
goto out;