Re: [cset] Add the EVIOCSABS ioctl for X people.

Brad Hards (bhards@bigpond.net.au)
Fri, 26 Jul 2002 00:47:20 +1000


On Fri, 26 Jul 2002 00:38, Vojtech Pavlik wrote:
> Hi!
>
> You can import this changeset into BK by piping this whole message to:
> '| bk receive [path to repository]' or apply the patch as usual.
> 'bk pull http://linux-input.bkbits.net:8080/linux-input' should also
> work.
>
> ===================================================================
>
> ChangeSet@1.448, 2002-07-25 16:36:05+02:00, vojtech@twilight.ucw.cz
> Add EVIOCSABS() ioctl to change the abs* informative
> values on input devices. This is something the X peoople
> really wanted.
Grr. I was just working on modifying this ioctl() to return
something better than int[5], which is pretty ugly.

How about something along these lines (I have the rest of it - its
just trivial changes to evdev.c)?

I could live with curr, min and max instead of *_value, but it
would be nicer if it was a bit more descriptive.

Brad

diff -Naur -X dontdiff linux-2.5.27-eventapi/include/linux/input.h linux-2.5.27-eventapi2/include/linux/input.h
--- linux-2.5.27-eventapi/include/linux/input.h Tue Jul 23 21:36:37 2002
+++ linux-2.5.27-eventapi2/include/linux/input.h Fri Jul 26 00:17:57 2002
@@ -63,6 +63,14 @@
uint16_t version;
};

+struct input_absinfo {
+ int curr_value;
+ int min_value;
+ int max_value;
+ int fuzz;
+ int flat;
+};
+
#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
#define EVIOCGID _IOR('E', 0x02, struct input_devinfo) /* get device ID */
#define EVIOCGREP _IOR('E', 0x03, int[2]) /* get repeat settings */
@@ -79,7 +87,7 @@
#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */

#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */
-#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, int[5]) /* get abs value/limits */
+#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */

-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/