Thread (1 message) 1 message, 1 author, 2011-05-06

Re: [PATCH v2 3/3] Add sixaxis plugin: USB pairing and LEDs settings

From: Antonio Ospite <hidden>
Date: 2011-05-06 08:45:30
Also in: linux-input

On Fri, 06 May 2011 02:14:38 +0100
Bastien Nocera [off-list ref] wrote:
On Fri, 2011-02-25 at 11:04 +0100, Antonio Ospite wrote:
quoted
+                       [AC_LANG_PROGRAM([[
+                               #include <sys/ioctl.h>
+                               #include <linux/hidraw.h>
+                               #if ! (defined(HIDIOCSFEATURE) &&
defined(HIDIOCGFEATURE))
+                               #error "HIDIOCSFEATURE and
HIDIOCGFEATURE are required (linux-libc-dev >= 2.6.3x)"
+                               #endif
+                               ]], 
The only part of the patch I have a problem with is this one.

I'd rather the code had:
#ifndef HIDIOCSFEATURE
#define HIDIOCSFEATURE bleh
#endif

And gracefully handled the ioctl not being available on the running
kernel (eg. "Not handling plugged in Sixaxis joypad because the kernel
lacks HIDIOCSFEATURE support").
I'll give that a try a report back my opinion.
Thanks.
The rest looks fine, and I'll be testing whether my Fedora 15 kernel has
the feature merged in yet (which would make testing your code much
easier).
Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help