diff options
Diffstat (limited to 'package/kbd/patches/patch-src_setvtrgb_c')
-rw-r--r-- | package/kbd/patches/patch-src_setvtrgb_c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/package/kbd/patches/patch-src_setvtrgb_c b/package/kbd/patches/patch-src_setvtrgb_c new file mode 100644 index 000000000..fc72c2409 --- /dev/null +++ b/package/kbd/patches/patch-src_setvtrgb_c @@ -0,0 +1,70 @@ +--- kbd-2.0.1.orig/src/setvtrgb.c 2013-08-27 22:45:33.000000000 +0200 ++++ kbd-2.0.1/src/setvtrgb.c 2014-03-24 13:10:47.000000000 +0100 +@@ -5,7 +5,7 @@ + #include <sys/ioctl.h> + #include <linux/kd.h> + #include <errno.h> +-#include <error.h> ++#include <err.h> + #include "kbd.h" + #include "getfd.h" + #include "nls.h" +@@ -60,7 +60,7 @@ set_colormap(unsigned char *colormap) + + /* Apply the color map to the tty via ioctl */ + if (ioctl(fd, PIO_CMAP, colormap) == -1) +- error(EXIT_FAILURE, errno, "ioctl"); ++ err(EXIT_FAILURE, "ioctl"); + + close(fd); + } +@@ -72,7 +72,7 @@ parse_file(FILE *fd, const char *filenam + unsigned int rows, cols, val; + + if ((cmap = calloc(3 * 16, sizeof(unsigned char))) == NULL) +- error(EXIT_FAILURE, errno, "calloc"); ++ err(EXIT_FAILURE, "calloc"); + + for (rows = 0; rows < 3; rows++) { + cols = 0; +@@ -80,26 +80,26 @@ parse_file(FILE *fd, const char *filenam + while (cols < 16) { + if ((c = fscanf(fd, "%u", &val)) != 1) { + if (c == EOF) +- error(EXIT_FAILURE, errno, "fscanf"); ++ err(EXIT_FAILURE, "fscanf"); + +- error(EXIT_FAILURE, 0, _("Error: %s: Invalid value in field %u in line %u."), ++ err(EXIT_FAILURE, _("Error: %s: Invalid value in field %u in line %u."), + filename, rows + 1, cols + 1); + } + + cmap[rows + cols * 3] = (unsigned char) val; + + if (cols < 15 && fgetc(fd) != ',') +- error(EXIT_FAILURE, 0, _("Error: %s: Insufficient number of fields in line %u."), ++ err(EXIT_FAILURE, _("Error: %s: Insufficient number of fields in line %u."), + filename, rows + 1); + cols++; + } + + if ((c = fgetc(fd)) == EOF) +- error(EXIT_FAILURE, 0, _("Error: %s: Line %u has ended unexpectedly.\n"), ++ err(EXIT_FAILURE, _("Error: %s: Line %u has ended unexpectedly.\n"), + filename, rows + 1); + + if (c != '\n') +- error(EXIT_FAILURE, 0, _("Error: %s: Line %u is too long.\n"), ++ err(EXIT_FAILURE, _("Error: %s: Line %u is too long.\n"), + filename, rows + 1); + } + } +@@ -141,7 +141,7 @@ main(int argc, char **argv) { + + } else { + if ((fd = fopen(file, "r")) == NULL) +- error(EXIT_FAILURE, errno, "fopen"); ++ err(EXIT_FAILURE, "fopen"); + + parse_file(fd, file); + fclose(fd); |