Emulation of Linux V4L ioctls
Alexander at Leidinger.net
Mon Nov 23 13:43:02 UTC 2009
Quoting "J.R. Oldroyd" <fbsd at opal.com> (from Fri, 20 Nov 2009 10:36:22 -0500):
> On Fri, 20 Nov 2009 10:35:35 +0100, Alexander Leidinger
> <Alexander at leidinger.net> wrote:
>> Some things I noticed and worry about:
>> - videodev.h does not have a license, did you generate it
>> yourself or did you take it from somewhere?
>> - Does it needs to be named videodev.h, or can it also be
>> (if we may want to install this header at some point in time,
>> it should have a name compatible with linux, else we should
>> maybe add a linux_ prefix for consistence and for making it
>> very obvious what we are talking about)
>> - Why are you using __s32 and so on instead of the normal
>> fixed size int types? We also have lint for "linux int"
>> and so on in other files.
> This header is the same as the one used on Linux. In fact, I
> took this file from our pwcbsd driver, but it can also be found
> by googling for videodev.h which reveals it is
> on Linux 2.6 systems.
> There is indeed no license in this file.
And this fact makes it a little bit hard to import into FreeBSD, at
least for a person like me with not so much knowledge about
copyright/license stuff. Someone out there (@FreeBSD.org) who is
willing to put some official weight into this issue?
> The use of __s32 etc is because I used this file unchanged.
> - On which architecture has this been tested?
> - Will it run in linux32 emulation on amd64?
> Yes. I did this work on an amd64, in fact.
> - Are those structures known in userland (and as such need to
> have a specific size)? If yes, do they have different sizes
> in linux depending if the kernel is a 64bit kernel (amd64)
> or 32bit kernel (x86)?
> They are used in userland. Given the header's use of __s32
> etc, it looks to me like the structures have the same size
> on both x86 and amd64.
I've seen the use of non-fixed size variables (e.g. int). It would be
better to verify that they are the same size. Can you please write a
little program which includes the header and prints out the size of
all structures. This way we can run it on amd64 and i386 and compare.
Those of you who think you know everything are very annoying to those
of us who do.
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