aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-08-08 12:45:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-08-08 12:46:30 +1000
commitc0fdef44a475acacd6fab3883681855687a9b296 (patch)
treef1b3493fd9d3f4fda2524d691583825acf89d7dc
parent0e14da978ea906c7fdaf90f54f798a542e79ce8f (diff)
downloadexternal_evtest-c0fdef44a475acacd6fab3883681855687a9b296.tar.gz
external_evtest-c0fdef44a475acacd6fab3883681855687a9b296.tar.bz2
external_evtest-c0fdef44a475acacd6fab3883681855687a9b296.zip
Point users at fuser to figure out what has the device open
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--evtest.c7
-rw-r--r--evtest.txt5
2 files changed, 10 insertions, 2 deletions
diff --git a/evtest.c b/evtest.c
index 668d8c7..f2dc904 100644
--- a/evtest.c
+++ b/evtest.c
@@ -973,8 +973,6 @@ static int do_capture(const char *device)
return EXIT_FAILURE;
}
- free(filename);
-
if (!isatty(fileno(stdout)))
setbuf(stdout, NULL);
@@ -991,9 +989,14 @@ static int do_capture(const char *device)
" 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);
}
diff --git a/evtest.txt b/evtest.txt
index b614482..ab89afb 100644
--- a/evtest.txt
+++ b/evtest.txt
@@ -48,6 +48,11 @@ when debugging a synaptics device from within X. VT switching to a TTY or
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.