Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 14:42:51 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        "J.R. Oldroyd" <fbsd@opal.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Emulation of Linux V4L ioctls
Message-ID:  <20091123144251.11055vw9sv236voc@webmail.leidinger.net>
In-Reply-To: <20091120103622.0db845c8@shibato.opal.com>
References:  <20091119153159.610debc2@shibato.opal.com> <20091120103535.815072bwgvis0io0@webmail.leidinger.net> <20091120103622.0db845c8@shibato.opal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "J.R. Oldroyd" <fbsd@opal.com> (from Fri, 20 Nov 2009 10:36:22 -0500):

> On Fri, 20 Nov 2009 10:35:35 +0100, Alexander Leidinger  
> <Alexander@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.

> 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.

Bye,
Alexander.

-- 
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091123144251.11055vw9sv236voc>