Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/input-utils/files: input-utils-0.0.1-protocol-mismatch-fix.patch input-utils-0.0.1_pre20081014.patch
Date: Sun, 03 Jul 2011 07:56:29
Message-Id: 20110703075619.69A612004B@flycatcher.gentoo.org
1 robbat2 11/07/03 07:56:19
2
3 Added: input-utils-0.0.1-protocol-mismatch-fix.patch
4 input-utils-0.0.1_pre20081014.patch
5 Log:
6 Version bump. Port Debian patch. Also fix bug #344579: protocol version mismatch.
7
8 (Portage version: 2.2.0_alpha41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 sys-apps/input-utils/files/input-utils-0.0.1-protocol-mismatch-fix.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/input-utils/files/input-utils-0.0.1-protocol-mismatch-fix.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/input-utils/files/input-utils-0.0.1-protocol-mismatch-fix.patch?rev=1.1&content-type=text/plain
15
16 Index: input-utils-0.0.1-protocol-mismatch-fix.patch
17 ===================================================================
18 Patch from https://bugs.gentoo.org/attachment.cgi?id=262203&action=diff
19
20 --- input.c.orig 2011-02-12 02:29:40.308989368 -0500
21 +++ input.c 2011-02-12 02:30:21.209265625 -0500
22 @@ -46,17 +46,6 @@
23 if (verbose)
24 fprintf(stderr,"%s\n",filename);
25
26 - if (-1 == ioctl(fd,EVIOCGVERSION,&version)) {
27 - perror("ioctl EVIOCGVERSION");
28 - close(fd);
29 - return -1;
30 - }
31 - if (EV_VERSION != version) {
32 - fprintf(stderr, "protocol version mismatch (expected %d, got %d)\n",
33 - EV_VERSION, version);
34 - close(fd);
35 - return -1;
36 - }
37 return fd;
38 }
39
40
41
42
43 1.1 sys-apps/input-utils/files/input-utils-0.0.1_pre20081014.patch
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/input-utils/files/input-utils-0.0.1_pre20081014.patch?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/input-utils/files/input-utils-0.0.1_pre20081014.patch?rev=1.1&content-type=text/plain
47
48 Index: input-utils-0.0.1_pre20081014.patch
49 ===================================================================
50 This patch is derived from input-utils_0.0.20051128-4.diff.gz
51
52 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/GNUmakefile input-utils-0.0.20081014/GNUmakefile
53 --- input-utils-0.0.20081014.orig/GNUmakefile 2008-10-14 10:27:01.000000000 +0000
54 +++ input-utils-0.0.20081014/GNUmakefile 2011-07-03 07:49:07.000000000 +0000
55 @@ -7,7 +7,7 @@
56 LDLIBS += -lm
57
58 # build
59 -TARGETS := lsinput input-events input-kbd input-send input-recv lircd.conf
60 +TARGETS := lsinput input-events input-kbd lircd.conf
61 HEADERS := EV.h REL.h ABS.h MSC.h LED.h SND.h REP.h KEY.h BTN.h BUS.h SW.h
62
63 # default target
64 @@ -45,7 +45,7 @@
65
66 install: build
67 $(INSTALL_DIR) $(bindir) $(mandir)/man8
68 - $(INSTALL_BINARY) lsinput input-events input-kbd input-send input-recv $(bindir)
69 + $(INSTALL_BINARY) lsinput input-events input-kbd $(bindir)
70 $(INSTALL_DATA) lsinput.man $(mandir)/man8/lsinput.8
71 $(INSTALL_DATA) input-kbd.man $(mandir)/man8/input-kbd.8
72 $(INSTALL_DATA) input-events.man $(mandir)/man8/input-events.8
73 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/input-events.man input-utils-0.0.20081014/input-events.man
74 --- input-utils-0.0.20081014.orig/input-events.man 2005-07-27 14:17:04.000000000 +0000
75 +++ input-utils-0.0.20081014/input-events.man 2011-07-03 07:48:16.000000000 +0000
76 @@ -1,7 +1,7 @@
77 .TH INPUT-EVENTS 8 "July 2005" "" ""
78 .SH NAME
79
80 -input-events \- list input devices
81 +input-events \- print input events
82
83 .SH SYNOPSIS
84 \fBinput\-events \fR [\fB\-t\fR\ \fIsec\fR] [\fB\-g\fR]\ \fIdevnr\fR
85 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/input.h input-utils-0.0.20081014/input.h
86 --- input-utils-0.0.20081014.orig/input.h 2008-10-14 10:27:01.000000000 +0000
87 +++ input-utils-0.0.20081014/input.h 2011-07-03 07:48:16.000000000 +0000
88 @@ -1,7 +1,7 @@
89 #include <inttypes.h>
90
91 #include <sys/ioctl.h>
92 -#include "linux-input.h"
93 +#include <linux/input.h>
94
95 #define ev_name(code) ((code) < EV_MAX && EV_NAME[code] ? EV_NAME[code] : "???")
96 #define ev_type_name(type, code) ((code) < EV_TYPE_MAX[type] && EV_TYPE_NAME[type][code] ? EV_TYPE_NAME[type][code] : "???")
97 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/input-kbd.c input-utils-0.0.20081014/input-kbd.c
98 --- input-utils-0.0.20081014.orig/input-kbd.c 2008-10-14 10:27:01.000000000 +0000
99 +++ input-utils-0.0.20081014/input-kbd.c 2011-07-03 07:48:16.000000000 +0000
100 @@ -36,7 +36,6 @@
101 entry.keycode = KEY_RESERVED;
102 rc = ioctl(fd, EVIOCGKEYCODE, &entry);
103 if (rc < 0) {
104 - map->size--;
105 break;
106 }
107 if (map->size >= map->alloc) {
108 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/lirc.sh input-utils-0.0.20081014/lirc.sh
109 --- input-utils-0.0.20081014.orig/lirc.sh 2005-11-28 14:07:00.000000000 +0000
110 +++ input-utils-0.0.20081014/lirc.sh 2011-07-03 07:48:16.000000000 +0000
111 @@ -1,5 +1,5 @@
112 #!/bin/sh
113 -INPUT="linux-input.h"
114 +INPUT="/usr/include/linux/input.h"
115 cat <<EOF
116 begin remote
117 name linux-input-layer
118 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/lsinput.c input-utils-0.0.20081014/lsinput.c
119 --- input-utils-0.0.20081014.orig/lsinput.c 2004-04-21 11:55:44.000000000 +0000
120 +++ input-utils-0.0.20081014/lsinput.c 2011-07-03 07:48:16.000000000 +0000
121 @@ -1,5 +1,6 @@
122 #include <stdio.h>
123 #include <stdlib.h>
124 +#include <sys/stat.h>
125 #include <unistd.h>
126 #include <fcntl.h>
127
128 @@ -10,14 +11,19 @@
129 static void list_devices(void)
130 {
131 int i,fd;
132 + char filename[32];
133 + struct stat statbuf;
134
135 for (i = 0; i < 32; i++) {
136 - /* try to open */
137 - fd = device_open(i,1);
138 - if (-1 == fd)
139 - return;
140 - device_info(fd);
141 - close(fd);
142 + snprintf(filename,sizeof(filename), "/dev/input/event%d",i);
143 + if (stat(filename, &statbuf) == 0) {
144 + /* try to open */
145 + fd = device_open(i,1);
146 + if (-1 == fd)
147 + return;
148 + device_info(fd);
149 + close(fd);
150 + }
151 }
152 return;
153 }
154 diff -Nuar --exclude '*.rej' --exclude '*.orig' input-utils-0.0.20081014.orig/name.sh input-utils-0.0.20081014/name.sh
155 --- input-utils-0.0.20081014.orig/name.sh 2004-04-21 11:55:44.000000000 +0000
156 +++ input-utils-0.0.20081014/name.sh 2011-07-03 07:48:16.000000000 +0000
157 @@ -1,7 +1,7 @@
158 #!/bin/sh
159
160 TYPE="$1"
161 -INPUT="linux-input.h"
162 +INPUT="/usr/include/linux/input.h"
163
164 awk "
165 /EV_VERSION/ { next };