aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--evtest.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/evtest.c b/evtest.c
index d32337b..e1ac76a 100644
--- a/evtest.c
+++ b/evtest.c
@@ -103,6 +103,10 @@ static const struct query_mode {
static int grab_flag = 0;
static volatile sig_atomic_t stop = 0;
+#ifndef program_invocation_short_name
+static char* program_invocation_short_name = "evtest";
+#endif
+
static void interrupt_handler(int sig)
{
stop = 1;
@@ -871,7 +875,8 @@ static char* scan_devices(void)
char *filename;
int max_device = 0;
- ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, versionsort);
+ ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, alphasort);
+
if (ndev <= 0)
return NULL;