Hello community,

here is the log from the commit of package evtest for openSUSE:Factory checked 
in at 2015-01-14 11:44:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/evtest (Old)
 and      /work/SRC/openSUSE:Factory/.evtest.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "evtest"

Changes:
--------
--- /work/SRC/openSUSE:Factory/evtest/evtest.changes    2014-08-14 
14:58:02.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.evtest.new/evtest.changes       2015-01-14 
11:45:13.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Jan 12 00:59:32 UTC 2015 - [email protected]
+
+- Update to version 1.32
+  + No changelog available
+
+-------------------------------------------------------------------

Old:
----
  evtest-1.31.tar.gz

New:
----
  evtest-1.32.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ evtest.spec ++++++
--- /var/tmp/diff_new_pack.Z8jEfL/_old  2015-01-14 11:45:13.000000000 +0100
+++ /var/tmp/diff_new_pack.Z8jEfL/_new  2015-01-14 11:45:13.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package evtest
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
 #
 
 Name:           evtest
-Version:        1.31
+Version:        1.32
 Release:        0
 Summary:        Input device event monitor and query tool
 License:        GPL-2.0+

++++++ evtest-1.31.tar.gz -> evtest-1.32.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evtest-1.31/README new/evtest-1.32/README
--- old/evtest-1.31/README      1970-01-01 01:00:00.000000000 +0100
+++ new/evtest-1.32/README      2014-08-08 04:49:19.000000000 +0200
@@ -0,0 +1,19 @@
+Summary
+=======
+evtest is a tool to print evdev kernel events. It reads directly from the
+kernel device and prints a device description and the events with the value
+and the symbolic name.
+
+Usage:
+   evtest /dev/input/event0
+
+Note: in most cases evtest needs to run as root to be able to read the
+devices.
+
+For more information, see the evtest(1) man page.
+
+
+Development
+==========
+Please send patches to [email protected]
+http://lists.freedesktop.org/mailman/listinfo/input-tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evtest-1.31/configure.ac new/evtest-1.32/configure.ac
--- old/evtest-1.31/configure.ac        2013-06-04 00:33:51.000000000 +0200
+++ new/evtest-1.32/configure.ac        2014-08-08 04:49:19.000000000 +0200
@@ -1,5 +1,5 @@
 AC_PREREQ([2.57])
-AC_INIT(evtest,[1.31], 
[https://bugzilla.freedesktop.org/enter_bug.cgi?product=evtest], evtest)
+AC_INIT(evtest,[1.32], 
[https://bugzilla.freedesktop.org/enter_bug.cgi?product=evtest], evtest)
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 AC_CONFIG_HEADERS(config.h)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evtest-1.31/evtest.c new/evtest-1.32/evtest.c
--- old/evtest-1.31/evtest.c    2013-06-04 00:33:51.000000000 +0200
+++ new/evtest-1.32/evtest.c    2014-08-08 04:49:19.000000000 +0200
@@ -69,9 +69,16 @@
 #ifndef EV_SYN
 #define EV_SYN 0
 #endif
+#ifndef SYN_MAX
+#define SYN_MAX 3
+#define SYN_CNT (SYN_MAX + 1)
+#endif
 #ifndef SYN_MT_REPORT
 #define SYN_MT_REPORT 2
 #endif
+#ifndef SYN_DROPPED
+#define SYN_DROPPED 3
+#endif
 
 #define NAME_ELEMENT(element) [element] = #element
 
@@ -162,6 +169,22 @@
        NAME_ELEMENT(EV_FF_STATUS),             NAME_ELEMENT(EV_SW),
 };
 
+static const int maxval[EV_MAX + 1] = {
+       [0 ... EV_MAX] = -1,
+       [EV_SYN] = SYN_MAX,
+       [EV_KEY] = KEY_MAX,
+       [EV_REL] = REL_MAX,
+       [EV_ABS] = ABS_MAX,
+       [EV_MSC] = MSC_MAX,
+       [EV_SW] = SW_MAX,
+       [EV_LED] = LED_MAX,
+       [EV_SND] = SND_MAX,
+       [EV_REP] = REP_MAX,
+       [EV_FF] = FF_MAX,
+       [EV_FF_STATUS] = FF_STATUS_MAX,
+};
+
+
 #ifdef INPUT_PROP_SEMI_MT
 static const char * const props[INPUT_PROP_MAX + 1] = {
        [0 ... INPUT_PROP_MAX] = NULL,
@@ -378,6 +401,15 @@
        NAME_ELEMENT(KEY_TOUCHPAD_ON),
        NAME_ELEMENT(KEY_TOUCHPAD_OFF),
 #endif
+#ifdef KEY_CAMERA_ZOOMIN
+       NAME_ELEMENT(KEY_CAMERA_ZOOMIN),        
NAME_ELEMENT(KEY_CAMERA_ZOOMOUT),
+       NAME_ELEMENT(KEY_CAMERA_UP),            NAME_ELEMENT(KEY_CAMERA_DOWN),
+       NAME_ELEMENT(KEY_CAMERA_LEFT),          NAME_ELEMENT(KEY_CAMERA_RIGHT),
+#endif
+#ifdef KEY_ATTENDANT_ON
+       NAME_ELEMENT(KEY_ATTENDANT_ON),         NAME_ELEMENT(KEY_ATTENDANT_OFF),
+       NAME_ELEMENT(KEY_ATTENDANT_TOGGLE),     NAME_ELEMENT(KEY_LIGHTS_TOGGLE),
+#endif
 
        NAME_ELEMENT(BTN_0),                    NAME_ELEMENT(BTN_1),
        NAME_ELEMENT(BTN_2),                    NAME_ELEMENT(BTN_3),
@@ -394,9 +426,14 @@
        NAME_ELEMENT(BTN_BASE),                 NAME_ELEMENT(BTN_BASE2),
        NAME_ELEMENT(BTN_BASE3),                NAME_ELEMENT(BTN_BASE4),
        NAME_ELEMENT(BTN_BASE5),                NAME_ELEMENT(BTN_BASE6),
-       NAME_ELEMENT(BTN_DEAD),                 NAME_ELEMENT(BTN_A),
-       NAME_ELEMENT(BTN_B),                    NAME_ELEMENT(BTN_C),
+       NAME_ELEMENT(BTN_DEAD),                 NAME_ELEMENT(BTN_C),
+#ifdef BTN_SOUTH
+       NAME_ELEMENT(BTN_SOUTH),                NAME_ELEMENT(BTN_EAST),
+       NAME_ELEMENT(BTN_NORTH),                NAME_ELEMENT(BTN_WEST),
+#else
+       NAME_ELEMENT(BTN_A),                    NAME_ELEMENT(BTN_B),
        NAME_ELEMENT(BTN_X),                    NAME_ELEMENT(BTN_Y),
+#endif
        NAME_ELEMENT(BTN_Z),                    NAME_ELEMENT(BTN_TL),
        NAME_ELEMENT(BTN_TR),                   NAME_ELEMENT(BTN_TL2),
        NAME_ELEMENT(BTN_TR2),                  NAME_ELEMENT(BTN_SELECT),
@@ -412,6 +449,11 @@
        NAME_ELEMENT(BTN_GEAR_DOWN),
        NAME_ELEMENT(BTN_GEAR_UP),
 
+#ifdef BTN_DPAD_UP
+       NAME_ELEMENT(BTN_DPAD_UP),              NAME_ELEMENT(BTN_DPAD_DOWN),
+       NAME_ELEMENT(BTN_DPAD_LEFT),            NAME_ELEMENT(BTN_DPAD_RIGHT),
+#endif
+
 #ifdef BTN_TRIGGER_HAPPY
        NAME_ELEMENT(BTN_TRIGGER_HAPPY1),       
NAME_ELEMENT(BTN_TRIGGER_HAPPY11),
        NAME_ELEMENT(BTN_TRIGGER_HAPPY2),       
NAME_ELEMENT(BTN_TRIGGER_HAPPY12),
@@ -525,12 +567,12 @@
        NAME_ELEMENT(SND_TONE)
 };
 
-static const char * const syns[3] = {
+static const char * const syns[SYN_MAX + 1] = {
+       [0 ... SYN_MAX] = NULL,
        NAME_ELEMENT(SYN_REPORT),
        NAME_ELEMENT(SYN_CONFIG),
-#ifdef SYN_MT_REPORT
-       NAME_ELEMENT(SYN_MT_REPORT)
-#endif
+       NAME_ELEMENT(SYN_MT_REPORT),
+       NAME_ELEMENT(SYN_DROPPED)
 };
 
 static const char * const switches[SW_MAX + 1] = {
@@ -737,12 +779,29 @@
        ioctl(fd, EVIOCGREP, rep);
 
        for (i = 0; i <= REP_MAX; i++) {
-               printf("    Property code %d (%s)\n", i, names[EV_REP] ? 
(names[EV_REP][i] ? names[EV_REP][i] : "?") : "?");
+               printf("    Repeat code %d (%s)\n", i, names[EV_REP] ? 
(names[EV_REP][i] ? names[EV_REP][i] : "?") : "?");
                printf("      Value %6d\n", rep[i]);
        }
 
 }
 
+static inline const char* typename(unsigned int type)
+{
+       return (type <= EV_MAX && events[type]) ? events[type] : "?";
+}
+
+static inline const char* codename(unsigned int type, unsigned int code)
+{
+       return (type <= EV_MAX && code <= maxval[type] && names[type] && 
names[type][code]) ? names[type][code] : "?";
+}
+
+#ifdef INPUT_PROP_SEMI_MT
+static inline const char* propname(unsigned int prop)
+{
+       return (prop <= INPUT_PROP_MAX && props[prop]) ? props[prop] : "?";
+}
+#endif
+
 /**
  * Print static device information (no events). This information includes
  * version numbers, device name and all bits supported by this device.
@@ -752,7 +811,7 @@
  */
 static int print_device_info(int fd)
 {
-       int i, j;
+       unsigned int type, code, prop;
        int version;
        unsigned short id[4];
        char name[256] = "Unknown";
@@ -780,30 +839,32 @@
        ioctl(fd, EVIOCGBIT(0, EV_MAX), bit[0]);
        printf("Supported events:\n");
 
-       for (i = 0; i < EV_MAX; i++)
-               if (test_bit(i, bit[0]) && i != EV_REP) {
-                       printf("  Event type %d (%s)\n", i, events[i] ? 
events[i] : "?");
-                       if (!i) continue;
-                       ioctl(fd, EVIOCGBIT(i, KEY_MAX), bit[i]);
-                       for (j = 0; j < KEY_MAX; j++)
-                               if (test_bit(j, bit[i])) {
-                                       printf("    Event code %d (%s)\n", j, 
names[i] ? (names[i][j] ? names[i][j] : "?") : "?");
-                                       if (i == EV_ABS)
-                                               print_absdata(fd, j);
+       for (type = 0; type < EV_MAX; type++) {
+               if (test_bit(type, bit[0]) && type != EV_REP) {
+                       printf("  Event type %d (%s)\n", type, typename(type));
+                       if (type == EV_SYN) continue;
+                       ioctl(fd, EVIOCGBIT(type, KEY_MAX), bit[type]);
+                       for (code = 0; code < KEY_MAX; code++)
+                               if (test_bit(code, bit[type])) {
+                                       printf("    Event code %d (%s)\n", 
code, codename(type, code));
+                                       if (type == EV_ABS)
+                                               print_absdata(fd, code);
                                }
                }
+       }
 
+       if (test_bit(EV_REP, bit[0])) {
+               printf("Key repeat handling:\n");
+               printf("  Repeat type %d (%s)\n", EV_REP, events[EV_REP] ?  
events[EV_REP] : "?");
+               print_repdata(fd);
+       }
 #ifdef INPUT_PROP_SEMI_MT
        memset(propbits, 0, sizeof(propbits));
        ioctl(fd, EVIOCGPROP(sizeof(propbits)), propbits);
        printf("Properties:\n");
-       if (test_bit(EV_REP, bit[0])) {
-               printf("  Property type %d (%s)\n", EV_REP, events[EV_REP] ?  
events[EV_REP] : "?");
-               print_repdata(fd);
-       }
-       for (i = 0; i < INPUT_PROP_MAX; i++) {
-               if (test_bit(i, propbits))
-                       printf("  Property type %d (%s)\n", i, props[i] ?  
props[i] : "?");
+       for (prop = 0; prop < INPUT_PROP_MAX; prop++) {
+               if (test_bit(prop, propbits))
+                       printf("  Property type %d (%s)\n", prop, 
propname(prop));
        }
 #endif
 
@@ -831,20 +892,23 @@
                }
 
                for (i = 0; i < rd / sizeof(struct input_event); i++) {
+                       unsigned int type, code;
+
+                       type = ev[i].type;
+                       code = ev[i].code;
+
                        printf("Event: time %ld.%06ld, ", ev[i].time.tv_sec, 
ev[i].time.tv_usec);
 
-                       if (ev[i].type == EV_SYN) {
-                               if (ev[i].code == SYN_MT_REPORT)
-                                       printf("++++++++++++++ %s 
++++++++++++\n", syns[ev[i].code]);
+                       if (type == EV_SYN) {
+                               if (code == SYN_MT_REPORT)
+                                       printf("++++++++++++++ %s 
++++++++++++\n", codename(type, code));
                                else
-                                       printf("-------------- %s 
------------\n", syns[ev[i].code]);
+                                       printf("-------------- %s 
------------\n", codename(type, code));
                        } else {
                                printf("type %d (%s), code %d (%s), ",
-                                       ev[i].type,
-                                       events[ev[i].type] ? events[ev[i].type] 
: "?",
-                                       ev[i].code,
-                                       names[ev[i].type] ? 
(names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?");
-                               if (ev[i].type == EV_MSC && (ev[i].code == 
MSC_RAW || ev[i].code == MSC_SCAN))
+                                       type, typename(type),
+                                       code, codename(type, code));
+                               if (type == EV_MSC && (code == MSC_RAW || code 
== MSC_SCAN))
                                        printf("value %02x\n", ev[i].value);
                                else
                                        printf("value %d\n", ev[i].value);
@@ -882,7 +946,7 @@
 static int do_capture(const char *device)
 {
        int fd;
-       char *filename;
+       char *filename = NULL;
 
        if (!device) {
                fprintf(stderr, "No device specified, trying to scan all of 
%s/%s*\n",
@@ -906,16 +970,14 @@
                        fprintf(stderr, "You do not have access to %s. Try "
                                        "running as root instead.\n",
                                        filename);
-               return EXIT_FAILURE;
+               goto error;
        }
 
-       free(filename);
-
        if (!isatty(fileno(stdout)))
                setbuf(stdout, NULL);
 
        if (print_device_info(fd))
-               return EXIT_FAILURE;
+               goto error;
 
        printf("Testing ... (interrupt to exit)\n");
 
@@ -927,10 +989,19 @@
                       "  other grab is active.\n");
                printf("  In most cases, this is caused by an X driver,\n"
                       "  try VT-switching and re-run evtest again.\n");
+               printf("  Run the following command to see processes with\n"
+                      "  an open fd on this device\n"
+                      " \"fuser -v %s\"\n", filename);
                printf("***********************************************\n");
        }
 
+       free(filename);
+
        return print_events(fd);
+
+error:
+       free(filename);
+       return EXIT_FAILURE;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/evtest-1.31/evtest.txt new/evtest-1.32/evtest.txt
--- old/evtest-1.31/evtest.txt  2013-06-04 00:33:51.000000000 +0200
+++ new/evtest-1.32/evtest.txt  2014-08-08 04:49:19.000000000 +0200
@@ -48,6 +48,11 @@
 shutting down the X server terminates this grab and synaptics devices can be
 debugged.
 
+The following command shows the processes with an open file descriptor on
+the device:
+
+   fuser -v /dev/input/eventX
+
 EXIT CODE
 ---------
 evtest returns 1 on error.

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to