summaryrefslogtreecommitdiff
path: root/package/kbd/patches/patch-src_kbdinfo_c
blob: cd322eb3c36cfaedb7a2a3e8c27e26e619f4920a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- kbd-2.0.1.orig/src/kbdinfo.c	2013-08-27 22:45:33.000000000 +0200
+++ kbd-2.0.1/src/kbdinfo.c	2014-03-24 13:24:51.000000000 +0100
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <errno.h>
-#include <error.h>
+#include <err.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <linux/kd.h>
@@ -75,7 +75,7 @@ main(int argc, char **argv) {
 
 	if (!strcasecmp("GETMODE", action)) {
 		if (ioctl(fd, KDGETMODE, &mode) == -1)
-			error(EXIT_FAILURE, errno, "ioctl");
+			err(EXIT_FAILURE, "ioctl");
 
 		switch (mode) {
 			case KD_TEXT:		rc = answer("text");		break;
@@ -84,7 +84,7 @@ main(int argc, char **argv) {
 
 	} else if (!strcasecmp("GKBMODE", action)) {
 		if (ioctl(fd, KDGKBMODE, &mode) == -1)
-			error(EXIT_FAILURE, errno, "ioctl");
+			err(EXIT_FAILURE, "ioctl");
 
 		switch (mode) {
 			case K_RAW:		rc = answer("raw");		break;
@@ -95,7 +95,7 @@ main(int argc, char **argv) {
 
 	} else if (!strcasecmp("GKBMETA", action)) {
 		if (ioctl(fd, KDGKBMETA, &mode) == -1)
-			error(EXIT_FAILURE, errno, "ioctl");
+			err(EXIT_FAILURE, "ioctl");
 
 		switch (mode) {
 			case K_METABIT:		rc = answer("metabit");		break;
@@ -104,7 +104,7 @@ main(int argc, char **argv) {
 
 	} else if (!strcasecmp("GKBLED", action)) {
 		if (ioctl(fd, KDGKBLED, &flags) == -1)
-			error(EXIT_FAILURE, errno, "ioctl");
+			err(EXIT_FAILURE, "ioctl");
 
 		mode = (flags & 0x7);