V4L: videodev, allow VIDIOCGMBUF
PATCH 1/2 V4L: videodev, allow VIDIOCGMBUF
videodev, allow VIDIOCGMBUF
this is 'v' compat ioctl handled in v4l2
---
commit fdc535e5e7c1b1781e903d4d21e1f657a9ac12c9
tree 8beb32a89d2679b14577762ebec8fb3c1e81fcaf
parent 94b6ccaf1ca50632014202d3eeb99a0e23185ddb
author Jiri Slaby <[email protected]> Sat, 05 May 2007 17:47:31 +0200 committer Jiri Slaby <[email protected]> Sat, 05 May 2007 17:47:31 +0200
drivers/media/video/videodev.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/media/video/videodev.c +4 -1
@@ -438,7 +438,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, } if (_IOC_TYPE(cmd)=='v') -return v4l_compat_translate_ioctl (inode,file,cmd,arg, +#ifdef CONFIG_VIDEO_V4L1_COMPAT + if (cmd != VIDIOCGMBUF) /* <-- handled below vvv */ +#endif +return v4l_compat_translate_ioctl (inode,file,cmd,arg, __video_do_ioctl);switch (cmd) {
PATCH 2/2 V4L: v4l1-compat, fix VIDIOCSPICT for non-OVERLAY
v4l1-compat, fix VIDIOCSPICT for non-OVERLAY
Do not return EINVAL for devices, which don't support overlay.
---
commit 637f1c324c57b002bcc94f68a1150e1ff32593c4
tree cf35d8f5990c1f335778bd85a4461c4e716daeef
parent fdc535e5e7c1b1781e903d4d21e1f657a9ac12c9
author Jiri Slaby <[email protected]> Sun, 06 May 2007 19:48:30 +0200 committer Jiri Slaby <[email protected]> Sun, 06 May 2007 19:48:30 +0200
drivers/media/video/v4l1-compat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/v4l1-compat.c +1 -1
@@ -653,8 +653,8 @@ v4l_compat_translate_ioctl(struct inode *inode, err =drv (inode, file,VIDIOC_S_FBUF , &fbuf2);if (err <0 )dprintk ("VIDIOCSPICT / VIDIOC_S_FBUF: %d\n" ,err); - err =0 ;/* likely fails for non-root */ } + err =0 ;/* G_ fails for non-OVERLAY, S_ likely for non-root */ break ; }case VIDIOCGTUNER :/* get tuner information */
Re: [PATCH 2/2] V4L: v4l1-compat, fix VIDIOCSPICT for non-OVERLAY
Hi Jiri,
Em Ter, 2007-05-08 às 20:25 +0200, Jiri Slaby escreveu:
Quoted 3 lines
v4l1-compat, fix VIDIOCSPICT for non-OVERLAY
Do not return EINVAL for devices, which don't support overlay.
The patch bellow also provides a proper fix for VIDIOCSPICT:
Cheers,
Mauro
Hi Jiri,
drivers/media/video/videodev.c static int __video_do_ioctl(struct inode *inode, struct file *file, · line 445
Quoted 8 lines
if (_IOC_TYPE(cmd)=='v')drivers/media/video/videodev.c +4
-1-return v4l_compat_translate_ioctl (inode,file,cmd,arg, +#ifdef CONFIG_VIDEO_V4L1_COMPAT + if (cmd != VIDIOCGMBUF) /* <-- handled below vvv */ +#endif +return v4l_compat_translate_ioctl (inode,file,cmd,arg, __video_do_ioctl);
I've committed two patches on my -git tree that will fix the issue you're pointing.
In fact, all the above code should be handled only if V4L1_COMPAT is enabled. The fixes are at the following patches:
Cheers,
Mauro