12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- --- 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);
-
|