summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.c
diff options
context:
space:
mode:
authorfvdl <fvdl@NetBSD.org>2000-12-29 20:07:53 +0000
committerfvdl <fvdl@NetBSD.org>2000-12-29 20:07:53 +0000
commit6f552a029f3db2f1eb61981e12cb9d12b7ac8a39 (patch)
tree07cc5ac35cb9502a0fcf2cc53e22fb2b1a4d31ea /sys/compat/linux/common/linux_socket.c
parentb930296d076db17c5cc7d837980bff3e5273271d (diff)
Allow the EJUSTRETURN hack for PTIOCLINUX-passed through ioctl calls.
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
-rw-r--r--sys/compat/linux/common/linux_socket.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c
index 5449be795c1..77d654f3e37 100644
--- a/sys/compat/linux/common/linux_socket.c
+++ b/sys/compat/linux/common/linux_socket.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.26 2000/12/22 23:41:16 fvdl Exp $ */
+/* $NetBSD: linux_socket.c,v 1.27 2000/12/29 20:07:53 fvdl Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -631,6 +631,14 @@ linux_ioctl_socket(p, uap, retval)
pt.com = SCARG(uap, com);
pt.data = SCARG(uap, data);
error = ioctlf(fp, PTIOCLINUX, (caddr_t)&pt, p);
+ /*
+ * XXX hack: if the function returns EJUSTRETURN,
+ * it has stuffed a sysctl return value in pt.data.
+ */
+ if (error == EJUSTRETURN) {
+ retval[0] = (register_t)pt.data;
+ error = 0;
+ }
goto out;
}