~ubuntu-branches/ubuntu/quantal/joystick/quantal

« back to all changes in this revision

Viewing changes to debian/patches/ioctl-error-handling.patch

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-05-16 16:11:59 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100516161159-tf754mo83ojh1yqj
Tags: 20051019-11
evtest: flush standard output, thanks Florian Fainelli! Closes:
#581740.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                perror("jscal: error setting correction");
45
45
                exit(1);
46
46
        }
47
 
@@ -342,11 +342,11 @@
 
47
@@ -342,19 +342,19 @@
48
48
 {
49
49
        int i;
50
50
 
58
58
                perror("jscal: error getting buttons");
59
59
                exit(1);
60
60
        }
 
61
-       if (ioctl(fd, JSIOCGAXMAP, &axmap)) {
 
62
+       if (ioctl(fd, JSIOCGAXMAP, &axmap) < 0) {
 
63
                perror("jscal: error getting axis map");
 
64
                exit(1);
 
65
        }
 
66
-       if (ioctl(fd, JSIOCGBTNMAP, &buttonmap)) {
 
67
+       if (ioctl(fd, JSIOCGBTNMAP, &buttonmap) < 0) {
 
68
                buttons=0;
 
69
        }
 
70
 
61
71
@@ -400,7 +400,7 @@
62
72
                ax[i]=axmes[(axmap[i])];
63
73
        }