|
Removed
Link Here
|
| 1 |
--- evtest.c.orig 2019-08-02 18:14:30 UTC |
| 2 |
+++ evtest.c |
| 3 |
@@ -43,7 +43,7 @@ |
| 4 |
#include <config.h> |
| 5 |
#endif |
| 6 |
|
| 7 |
-#include <linux/version.h> |
| 8 |
+#include <sys/syslimits.h> |
| 9 |
#include <linux/input.h> |
| 10 |
|
| 11 |
#include <string.h> |
| 12 |
@@ -875,7 +875,7 @@ static char* scan_devices(void) |
| 13 |
char *filename; |
| 14 |
int max_device = 0; |
| 15 |
|
| 16 |
- ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, versionsort); |
| 17 |
+ ndev = scandir(DEV_INPUT_EVENT, &namelist, is_event_device, alphasort); |
| 18 |
if (ndev <= 0) |
| 19 |
return NULL; |
| 20 |
|
| 21 |
@@ -923,7 +923,7 @@ static int version(void) |
| 22 |
#ifndef PACKAGE_VERSION |
| 23 |
#define PACKAGE_VERSION "<version undefined>" |
| 24 |
#endif |
| 25 |
- printf("%s %s\n", program_invocation_short_name, PACKAGE_VERSION); |
| 26 |
+ printf("%s %s\n", getprogname(), PACKAGE_VERSION); |
| 27 |
return EXIT_SUCCESS; |
| 28 |
} |
| 29 |
|
| 30 |
@@ -935,12 +935,12 @@ static int usage(void) |
| 31 |
{ |
| 32 |
printf("USAGE:\n"); |
| 33 |
printf(" Capture mode:\n"); |
| 34 |
- printf(" %s [--grab] /dev/input/eventX\n", program_invocation_short_name); |
| 35 |
+ printf(" %s [--grab] /dev/input/eventX\n", getprogname()); |
| 36 |
printf(" --grab grab the device for exclusive access\n"); |
| 37 |
printf("\n"); |
| 38 |
printf(" Query mode: (check exit code)\n"); |
| 39 |
printf(" %s --query /dev/input/eventX <type> <value>\n", |
| 40 |
- program_invocation_short_name); |
| 41 |
+ getprogname()); |
| 42 |
|
| 43 |
printf("\n"); |
| 44 |
printf("<type> is one of: EV_KEY, EV_SW, EV_LED, EV_SND\n"); |