summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2010-01-15 15:38:31 +0000
committernetchild <netchild@FreeBSD.org>2010-01-15 15:38:31 +0000
commit7cde5eb62d88eb3ab7fc29c5d96e0b4e046aa3ae (patch)
tree7236a63cee798499cea9db9321c1be46abbfa569 /sys/compat
parenta64f684e51363967ebbc6e02c3aa6b2caa8e1c9f (diff)
downloadFreeBSD-src-7cde5eb62d88eb3ab7fc29c5d96e0b4e046aa3ae.zip
FreeBSD-src-7cde5eb62d88eb3ab7fc29c5d96e0b4e046aa3ae.tar.gz
Whitespace change to be able to provide the correct commit log for r202364:
---snip--- Add video clipping support but with the caveats below. Background info: Video clipping allows the user to provide either a series of clip rectangles or a clip bitmap to the driver and have the driver mask the video according to the clipping specs provided. Adding support for clipping to the FreeBSD Linux emulator is problematic because it seems that this feature is not supported by many drivers and therefore it is ignored by many applications. Unfortunately, when not using it, rather than passing in a null clipping list, some apps leave the clipping fields uninitialized, casuing random values to be passed in. In the case where the driver does not use the clipping info, this is not a problem (although it is bad form). But the Linux emulator does not know which drivers will use this and which won't, so the Linux emulator must try to handle this clip list, and deal gracefully with cases where the values seem to be uninitialized. Video clipping info is passed in using the VIDIOCSWIN ioctl in two fields in the video_window structure: the integer clipcount and the pointer clips. How the linuxulator handles this from this commit on: * if (clipcount == VIDEO_CLIP_BITMAP) The clips variable is a void * pointer to a 128*625 byte (1024*625 bit) memory area containing a bitmap of the clipping area. The pointer in the video_window structure is copied, but no video_clip structures are copied. * if (clipcount > 0 && clipcount <= 16384) The clips variable is pointer to a list of video_clip structures. Up to clipcount structures are copied and passed to the driver. The upper limit of 16384 was imposed here so that user code that does not properly initialize clipcount falls through below and no attempt is made to copy an uninitialized list. This value was found by examining Linux drivers that support the clip list. * else The clipcount is either negative (but not VIDEO_CLIP_BITMAP), zero or positive (> 16384). All these cases are treated as invalid data. Both the clipcount field and clips pointer are forced to zero/NULL and passed to the driver. It should be noted that, at the time of developing this V4L emulator code, the pwc(4) V4L driver does not support clipping. Submitted by: J.R. Oldroyd <fbsd@opal.com> MFC after: 1 month ---snip---
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index e6f6581..33775c5 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -143,7 +143,7 @@ struct handler_element
};
static TAILQ_HEAD(, handler_element) handlers =
- TAILQ_HEAD_INITIALIZER(handlers);
+ TAILQ_HEAD_INITIALIZER(handlers);
static struct sx linux_ioctl_sx;
SX_SYSINIT(linux_ioctl, &linux_ioctl_sx, "linux ioctl handlers");
OpenPOWER on IntegriCloud