From: "Markus Rechberger" <mrechberger@gmail.com>
To: "Németh Márton" <nm127@freemail.hu>
Cc: mschimek@gmx.at, video4linux-list@redhat.com,
LKML <linux-kernel@vger.kernel.org>,
em28xx@mcentral.de
Subject: Re: [Em28xx] parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT?
Date: Tue, 16 Dec 2008 09:01:51 +0100 [thread overview]
Message-ID: <d9def9db0812160001x49f2a8c7udb11f35f6e1a27c9@mail.gmail.com> (raw)
In-Reply-To: <49475516.3090504@freemail.hu>
Hi,
2008/12/16 Németh Márton <nm127@freemail.hu>:
> Hi,
>
> I have a question about the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT
> parameters in v4l2 specification.
>
> The "Video for Linux Two API Specification" text says that the
> parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT is ...
>
>> [...] a pointer to an integer where the driver stores the number
>> of the input, as in the struct v4l2_input index field.
>>
>> http://v4l2spec.bytesex.org/spec/r11217.htm
>
> In the v4l2_input structure the index has the type of __u32.
>
> In contrast, in <linux/videodev2.h> (as of 2.6.27) the ioctls are defined
> as follows:
>
>> #define VIDIOC_G_INPUT _IOR('V', 38, int)
>> #define VIDIOC_S_INPUT _IOWR('V', 39, int)
>
> The problem is that '__u32' is unsigned and 'int' is signed. Furthermore
> one cannot be sure that sizeof(__u32) == sizeof(int) on all platforms.
>
> I guess that the parameter of VIDIOC_G_INPUT and VIDIOC_S_INPUT should be
> a pointer to __u32. What do you think?
>
seems to be sane yes. This ioctl is also handled in compat_ioctl32.c and might
also get some attention there.
Markus
prev parent reply other threads:[~2008-12-16 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 7:13 Németh Márton
2008-12-16 8:01 ` Markus Rechberger [this message]
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=d9def9db0812160001x49f2a8c7udb11f35f6e1a27c9@mail.gmail.com \
--to=mrechberger@gmail.com \
--cc=em28xx@mcentral.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mschimek@gmx.at \
--cc=nm127@freemail.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®