[PATCH] compat-ioctl glue code to make mga_vid work for 32-bit mplayer on 64-bit kernel

Dirk Porezag <[email protected]> Mon, 1 Sep 2008 14:58:41 -0700 (PDT)
Newsgroups gmane.comp.video.mplayer.user.matrox
Message-ID <[email protected]>
--0-2106808410-1220306321=:56211
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

I'm using 32-bit mplayer with a 64-bit amd64 kernel on Debian testing, kern=
el 2.6.26. The current SVN mga_vid kernel module won't work with this setup=
 since it is missing the compat_ioctl declarations necessary for 32-bit bin=
aries calling ioctls on a 64-bit Linux kernel. So I made a patch that provi=
des the necessary "glue code". I'm not an expert at this but it seems that =
the mga_vid module is 64-bit clean already (no "long" data types etc.) and =
all one has to do is to provide the compat_ioctl method which then calls th=
e native mga_vid_ioctl in turn. I have tested this successfully with the De=
bian testing 2.6.26-1-amd64 kernel and since the changes are fairly simple =
most other kernels should work the same. Patch is against the SVN version o=
f mga_vid.c (2008-08-02).=0A=0AHope this is useful,=0ADirk=0A=0A=0A________=
__________________________________________=0ADo You Yahoo!?=0ASie sind Spam=
 leid? Yahoo! Mail verf=C3=BCgt =C3=BCber einen herausragenden Schutz gegen=
 Massenmails. =0Ahttp://mail.yahoo.com 
--0-2106808410-1220306321=:56211
Content-Type: text/x-diff; name="mga_vid-2.6.26-2008-08-03-amd64.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mga_vid-2.6.26-2008-08-03-amd64.patch"

ZGlmZiAtdSBtZ2FfdmlkLTIuNi4yNi9tZ2FfdmlkLmMgbWdhX3ZpZC0yLjYu
MjYtYW1kNjQvbWdhX3ZpZC5jCi0tLSBtZ2FfdmlkLTIuNi4yNi9tZ2Ffdmlk
LmMJMjAwOC0wOC0wMiAxNzowMjowNi4wMDAwMDAwMDAgKzAyMDAKKysrIG1n
YV92aWQtMi42LjI2LWFtZDY0L21nYV92aWQuYwkyMDA4LTA5LTAxIDIyOjUz
OjUwLjAwMDAwMDAwMCArMDIwMApAQCAt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ZpZF9yZWFkLAogICAgICAgd3JpdGU6bWdhX3ZpZF93
cml0ZSwKICAgICAgIGlvY3RsOm1nYV92aWRfaW9jdGwsCisjaWZkZWYgQ09O
RklHX0NPTVBBVAorICAgICAgY29tcGF0X2lvY3RsOm1nYV92aWRfY29tcGF0
X2lvY3RsLAorI2VuZGlmCiAgICAgICBtbWFwOm1nYV92aWRfbW1hcCwKICAg
ICAgIG9wZW46bWdhX3ZpZF9vcGVuLAogICAgICAgcmVsZWFzZTptZ2Ffdmlk
X3JlbGVhc2UK

--0-2106808410-1220306321=:56211
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
MPlayer-matrox mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-matrox
--0-2106808410-1220306321=:56211--