Emulation of Linux V4L ioctls

Alexander Leidinger Alexander at Leidinger.net
Tue Nov 24 08:12:03 UTC 2009


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.

-- 
nc(1) (or netcat) is useful not only for redirecting input/output to
TCP or UDP connections, but also for proxying them with inetd(8).

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-emulation mailing list