1
0

patch-src_kbdinfo_c 1.3 KB

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