From: "H. Willstrand" <h.willstrand@gmail.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: video4linux-list@redhat.com,
v4l2 library <v4l2-library@linuxtv.org>,
Brandon Philips <bphilips@suse.de>,
SPCA50x Linux Device Driver Development
<spca50x-devs@lists.sourceforge.net>
Subject: Re: [V4l2-library] Messed up syscall return value
Date: Tue, 29 Jul 2008 00:35:20 +0200 [thread overview]
Message-ID: <1217284520.3371.2.camel@localhost.localdomain> (raw)
In-Reply-To: <488E46BC.10104@gmail.com>
Hi!
I think the memory allocation is wrong, you have NBUFFERS = 2 but
memset( ... ) only allocates for 1 buffer.
Regards,
H.Willstrand
On Tue, 2008-07-29 at 00:22 +0200, Jiri Slaby wrote:
> On 07/29/2008 12:16 AM, Gregor Jasny wrote:
> > ioctl(3, VIDIOC_REQBUFS or VT_DISALLOCATE, 0x7fffbfda0060) = 2
> >
> > Huh? Something evils seems to be going on in V4L2 land.
> > I've spotted the following lines in videobuf-core.c:videobuf_reqbufs
> >
> > req->count = retval;
> >
> > done:
> > mutex_unlock(&q->vb_lock);
> > return retval;
> >
> > That would explain the retval '2'. It seems a retval = 0; statement is missing here for the success case.
>
> Actually positive ioctl retval used to be often considered as OK in the past
> (and this approach is still used in few char drivers).
>
> But according to v4l docco, it isn't permitted here. Anyway I wouldn't place it
> in videobuf-core.c, but in vivi code; letting this decision on Mauro (CCed) ;).
>
> _______________________________________________
> V4L2-library mailing list
> V4L2-library@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l2-library
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-07-28 22:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-23 12:20 Announcing libv4l 0.3.7 Hans de Goede
2008-07-28 21:49 ` Messed up syscall return value Gregor Jasny
[not found] ` <488E4090.5020600@gmail.com>
2008-07-28 22:16 ` [V4l2-library] " Gregor Jasny
[not found] ` <488E46BC.10104@gmail.com>
2008-07-28 22:34 ` Gregor Jasny
2008-07-28 22:35 ` H. Willstrand [this message]
2008-07-29 10:00 ` Hans de Goede
2008-07-29 11:52 ` Gregor Jasny
2008-07-29 19:49 ` Hans de Goede
2008-07-29 16:00 ` Mauro Carvalho Chehab
2008-07-29 19:05 ` Laurent Pinchart
2008-07-29 20:51 ` Mauro Carvalho Chehab
2008-07-29 20:57 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217284520.3371.2.camel@localhost.localdomain \
--to=h.willstrand@gmail.com \
--cc=bphilips@suse.de \
--cc=jirislaby@gmail.com \
--cc=spca50x-devs@lists.sourceforge.net \
--cc=v4l2-library@linuxtv.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.