Module Name: src Committed By: christos Date: Tue Aug 18 02:02:58 UTC 2009
Modified Files: src/sys/compat/linux32/common: linux32_ioctl.c Log Message: add the video ioctls so that the 32 bit skype works with video more commits to come To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/linux32/common/linux32_ioctl.c diff -u src/sys/compat/linux32/common/linux32_ioctl.c:1.12 src/sys/compat/linux32/common/linux32_ioctl.c:1.13 --- src/sys/compat/linux32/common/linux32_ioctl.c:1.12 Wed Nov 19 13:36:04 2008 +++ src/sys/compat/linux32/common/linux32_ioctl.c Mon Aug 17 22:02:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $ */ +/* $NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -32,12 +32,13 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $"); #include <sys/types.h> #include <sys/param.h> #include <sys/time.h> #include <sys/ucred.h> +#include <sys/ioctl.h> #include <compat/netbsd32/netbsd32.h> #include <compat/netbsd32/netbsd32_syscallargs.h> @@ -102,6 +103,23 @@ break; } break; + case 'V': /* video4linux2 */ + case 'd': /* drm */ + { + struct sys_ioctl_args ua; + u_long com = 0; + if (SCARG(uap, com) & IOC_IN) + com |= IOC_OUT; + if (SCARG(uap, com) & IOC_OUT) + com |= IOC_IN; + SCARG(&ua, fd) = SCARG(uap, fd); + SCARG(&ua, com) = SCARG(uap, com); + SCARG(&ua, com) &= ~IOC_DIRMASK; + SCARG(&ua, com) |= com; + SCARG(&ua, data) = SCARG_P32(uap, data); + error = sys_ioctl(l, (const void *)&ua, retval); + break; + } case 0x89: error = linux32_ioctl_socket(l, uap, retval); break;