diff options
-rw-r--r-- | evtest.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |