Emulation of Linux V4L ioctls
J.R. Oldroyd
fbsd at opal.com
Fri Nov 20 15:36:29 UTC 2009
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
> linux_videodev.h?
> (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
/usr/include/linux/videodev.h
on Linux 2.6 systems.
I think it really wants to be installed in /usr/include/linux
here too, since it is also useful for user apps that need
these structures and definitions. But I am not sure what our
policy would be for creating a /usr/include/linux dir for it.
If you prefer to keep it in this dir, yes it could be renamed
to linux_videodev.h.
There is indeed no license in this file.
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.
> - Has this been run through a "make universe"?
>
I built by compiling in sys/amd64/compile/XXX.
-jr
More information about the freebsd-emulation
mailing list