From owner-freebsd-emulation@FreeBSD.ORG Tue Nov 24 16:22:27 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B51B6106566C for ; Tue, 24 Nov 2009 16:22:27 +0000 (UTC) (envelope-from fbsd@opal.com) Received: from smtp.vzavenue.net (smtp.vzavenue.net [66.171.59.140]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD8A8FC0A for ; Tue, 24 Nov 2009 16:22:27 +0000 (UTC) Received: from 153.78.171.66.subscriber.vzavenue.net (HELO homobox.opal.com) ([66.171.78.153]) by smtp.vzavenue.net with ESMTP; 24 Nov 2009 11:22:25 -0500 X-REPUTATION: None X-REMOTE-IP: 66.171.78.153 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAIOSC0tCq06Z/2dsb2JhbACBTdQkhDkE X-IronPort-AV: i="4.47,280,1257138000"; d="asc'?scan'208"; a="211668544:sNHT23350734" Received: from opal.com (localhost [IPv6:::1]) (authenticated bits=0) by homobox.opal.com (8.14.3/8.14.3) with ESMTP id nAOGMNOo067077 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Nov 2009 11:22:24 -0500 (EST) (envelope-from fbsd@opal.com) Received: from shibato.opal.com ([2001:5c0:1100:f103:221:63ff:fe5a:c9a7] helo=shibato.opal.com) with IPv6:587 by opal.com; 24 Nov 2009 11:22:23 -0500 Date: Tue, 24 Nov 2009 11:22:20 -0500 From: "J.R. Oldroyd" To: Alexander Leidinger Message-ID: <20091124112220.6b4b742f@shibato.opal.com> In-Reply-To: <20091124091151.12733pwkk9ha1yyo@webmail.leidinger.net> References: <20091119153159.610debc2@shibato.opal.com> <20091120103535.815072bwgvis0io0@webmail.leidinger.net> <20091120103622.0db845c8@shibato.opal.com> <20091123144251.11055vw9sv236voc@webmail.leidinger.net> <20091123125403.20e3a63e@shibato.opal.com> <20091124091151.12733pwkk9ha1yyo@webmail.leidinger.net> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; amd64-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/drtcgybMn8.uAXXWWAIXjQj"; protocol="application/pgp-signature" Cc: freebsd-emulation@freebsd.org Subject: Re: Emulation of Linux V4L ioctls X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 16:22:27 -0000 --Sig_/drtcgybMn8.uAXXWWAIXjQj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 24 Nov 2009 09:11:51 +0100, Alexander Leidinger wrote: > > Quoting "J.R. Oldroyd" (from Mon, 23 Nov 2009 12:54:03 -0= 500): >=20 > > My test app is the net/skype port which installs: > > /usr/local/share/skype/skype: ELF 32-bit LSB executable, Intel =20 > > 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), =20 > > 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. >=20 > Your "appear" is the right word. Licensing issues aside (I try to get =20 > someone to have a look at it), I would import the code as is because =20 > of this and try to fix possible edge cases afterwards. The point is, =20 > we do not really know how much of the structure is used. It may be the =20 > case that the structure is partly compatible (and skype only uses this =20 > part), or compatible by accident (automatic padding by the compiler). =20 > With the right program (printing total size, ofsset of members, and =20 > size of memebers), you can detect both and take appropriate action. >=20 > Bye, > Alexander. >=20 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 --Sig_/drtcgybMn8.uAXXWWAIXjQj Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAksMCDwACgkQls33urr0k4mEVQCfS66iC4J8NMncQE7901cILkSs TDsAn1yA/pLLPJrUcd9aXyjDfdJFgxTm =ArcB -----END PGP SIGNATURE----- --Sig_/drtcgybMn8.uAXXWWAIXjQj--