summaryrefslogtreecommitdiff
path: root/evtest.c
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 /evtest.c
parent0e14da978ea906c7fdaf90f54f798a542e79ce8f (diff)
Point users at fuser to figure out what has the device open
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'evtest.c')
-rw-r--r--evtest.c7
1 files changed, 5 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);
}