Emulation of Linux V4L ioctls
J.R. Oldroyd
fbsd at opal.com
Tue Nov 24 16:22:27 UTC 2009
On Tue, 24 Nov 2009 09:11:51 +0100, Alexander Leidinger <Alexander at leidinger.net> wrote:
>
> Quoting "J.R. Oldroyd" <fbsd at opal.com> (from Mon, 23 Nov 2009 12:54:03 -0500):
>
> > My test app is the net/skype port which installs:
> > /usr/local/share/skype/skype: ELF 32-bit LSB executable, Intel
> > 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs),
> > for GNU/Linux 2.4.1, stripped
> >
> > I am running this on an amd64 with the code using the same
> > videodev.h. The video is working. Ergo, the structures appear
> > to be compatible.
>
> Your "appear" is the right word. Licensing issues aside (I try to get
> someone to have a look at it), I would import the code as is because
> of this and try to fix possible edge cases afterwards. The point is,
> we do not really know how much of the structure is used. It may be the
> case that the structure is partly compatible (and skype only uses this
> part), or compatible by accident (automatic padding by the compiler).
> With the right program (printing total size, ofsset of members, and
> size of memebers), you can detect both and take appropriate action.
>
> Bye,
> Alexander.
>
OK, I have placed such a program together with its output on
an amd64 and i386 here:
http://opal.com/freebsd/sys/compat/linux/linux_vidsize.c
http://opal.com/freebsd/sys/compat/linux/linux_vidsize_out.amd64
http://opal.com/freebsd/sys/compat/linux/linux_vidsize_out.i386
There are differences in sizes in the following:
video_tuner unsigned long rangelow
video_tuner unsigned long rangehigh
video_window struct video_clip * clips
video_buffer void * base
video_code __u8 * data
All are 8 bytes on the amd64 and 4 bytes on the i386.
-jr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20091124/01e37798/signature.pgp
More information about the freebsd-emulation
mailing list