v4l2 VIDIOC_DQBUF typo in 2.6.18
PATCH 1/1 v4l2 VIDIOC_DQBUF typo in 2.6.18
It seems that, in the rush to create the new V4L2 ioctl() API, the VIDIOC_DQBUF code got cut-and-pasted in without being fixed up. I went and made a patch, only to discover that Sascha Hauer beat me to it. That patch doesn't seem to have been picked up yet, however. Since it's important (streaming I/O will not work without it), here's an attempt to spread it a bit more widely.
jon
From: Sascha Hauer <[email protected]>
Subject: [PATCH] copy-paste bug in videodev.c
Date: Mon, 11 Sep 2006 10:50:55 +0200
To: [email protected]
This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf() function gets called for the dqbuf ioctl.
(quoted diff) +0 -0
b/drivers/media/video/videodev.c
index 88bf2af..8abee33 100644
drivers/media/video/videodev.c +2 -2
@@ -739,13 +739,13 @@ static int __video_do_ioctl(struct inodecase VIDIOC_DQBUF : {struct v4l2_buffer *p=arg; -if (!vfd->vidioc_qbuf) +if (!vfd->vidioc_dqbuf)break ; ret =check_fmt (vfd, p->type);if (ret)break ; - ret=vfd->vidioc_qbuf (file, fh, p); + ret=vfd->vidioc_dqbuf (file, fh, p);if (!ret)dbgbuf (cmd,vfd,p);break ;
Signature · 13 lines
Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
--=-=-=--Hi, Jonathan,
Em Seg, 2006-09-25 às 06:58 -0600, Jonathan Corbet escreveu:
Quoted 2 lines
It seems that, in the rush to create the new V4L2
ioctl()API, theVIDIOC_DQBUFcode got cut-and-pasted in without being fixed up.
Yes.
Quoted 1 line
I went and made a patch, only to discover that Sascha Hauer beat me to it.
It is already corrected at my -git tree and at V4L/DVB development tree, available at http://linuxtv.org/hg. The correction is also at -mm series.
This trouble were discovered too late at 2.6.18 cycle, and affected just vivi module, used to emulate a v4l2 driver. It is likely to affect just driver and userspace developers.
Quoted 3 lines
That patch doesn't seem to have been picked up yet, however. Since it's important (streaming I/O will not work without it), here's an attempt to spread it a bit more widely.
Cheers,
Mauro.