All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: Pavel Machek <pavel@ucw.cz>, Raphael Assenat <raph@raphnet.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ioctl entries for joystick in compat_ioctl.h
Date: Wed, 08 Dec 2004 11:25:05 -0800	[thread overview]
Message-ID: <1102533905.691.5.camel@localhost> (raw)
In-Reply-To: <20030912200148.GA7711@ucw.cz>

On Fri, 2003-09-12 at 22:01 +0200, Vojtech Pavlik wrote:
> On Fri, Sep 12, 2003 at 08:41:45PM +0200, Pavel Machek wrote:
> > Hi!
> > Raphael Assenat <raph@raphnet.net> wrote:
> > > I wanted to use a joystick on my sparc64 workstation, and discovered that the
> > > joystick driver uses simple ioclt that are safe to pass from 32bit user space
> > > to 64bit kernel space. My patch adds the necessary entries in compat_ioctl.h.
> > > 
> > > There is only one missing ioctl in the patch. The ioctl is defined like this:
> > > #define JSIOCGNAME(len)         _IOC(_IOC_READ, 'j', 0x13, len)
> > > so the command does not have a fixed value. I dont know how to handle this one,
> > > but it is only used to get the joystick name, all the applications I tried work
> > > well even if this ioctl fails.

[...]

> > Vojtech, this fill be needed on x86-64, too. Can you take care of it?


> > I have tested this patch with snes9x and jstest.c without any problems.
> > 
> > Regards,
> > Raphael Assenat
> > 
> > --- linux-2.6.0-test4/fs/compat_ioctl.c Fri Aug 22 20:00:50 2003
> > +++ linux-2.6.0-test4-raph/fs/compat_ioctl.c    Sun Sep  7 19:03:52 2003
> > @@ -65,6 +65,7 @@
> >  #include <linux/ctype.h>
> >  #include <linux/ioctl32.h>
> >  #include <linux/ncp_fs.h>
> > +#include <linux/joystick.h>
> > 
> >  #include <net/sock.h>          /* siocdevprivate_ioctl */
> >  #include <net/bluetooth/bluetooth.h>
> > --- linux-2.6.0-test4/include/linux/compat_ioctl.h      Fri Aug 22 20:01:27
> > 2003
> > +++ linux-2.6.0-test4-raph/include/linux/compat_ioctl.h Sun Sep  7 20:07:57
> > 2003
> > @@ -680,3 +680,16 @@
> >  COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
> >  COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
> >  COMPATIBLE_IOCTL(NBD_DISCONNECT)
> > +
> > +/* little j */
> > +#if defined(CONFIG_INPUT_JOYDEV)||defined(CONFIG_INPUT_JOYDEV_MODULE)
> > +COMPATIBLE_IOCTL(JSIOCGVERSION)
> > +COMPATIBLE_IOCTL(JSIOCGAXES)
> > +COMPATIBLE_IOCTL(JSIOCGBUTTONS)
> > +COMPATIBLE_IOCTL(JSIOCSCORR)
> > +COMPATIBLE_IOCTL(JSIOCGCORR)
> > +COMPATIBLE_IOCTL(JSIOCSAXMAP)
> > +COMPATIBLE_IOCTL(JSIOCGAXMAP)
> > +COMPATIBLE_IOCTL(JSIOCSBTNMAP)
> > +COMPATIBLE_IOCTL(JSIOCGBTNMAP)
> > +#endif

I notice that this patch does not appear in current kernels, and the
joystick doesn't work for 32-bit apps on x86-64.  Did this patch ever
make it into the kernel?  Or some replacement?  If not, what's the
problem?

Thanks,
	J


      parent reply	other threads:[~2004-12-08 19:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030912112557.C10099@raphnet.net>
2003-09-12 18:41 ` [PATCH] ioctl entries for joystick in compat_ioctl.h Pavel Machek
2003-09-12 20:01   ` Vojtech Pavlik
2003-09-12 21:13     ` Pavel Machek
2003-09-13  7:13       ` Vojtech Pavlik
2004-12-08 19:25     ` Jeremy Fitzhardinge [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1102533905.691.5.camel@localhost \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=raph@raphnet.net \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.