aboutsummaryrefslogtreecommitdiff
path: root/console-tools/loadkmap.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
commitd537a95fdbc0b4a5f38edea8593b4c085fdd7fcb (patch)
tree62127f20fc07758e445d8c4e186306cbe83d77b1 /console-tools/loadkmap.c
parent4ac6cb534d78d63d7b0a206118c56bad7024b9f8 (diff)
downloadbusybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.gz
busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.bz2
busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.zip
Use errorMsg rather than fprintf.
Diffstat (limited to 'console-tools/loadkmap.c')
-rw-r--r--console-tools/loadkmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index c2e4c94ed..72247a6e4 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -59,25 +59,25 @@ int loadkmap_main(int argc, char **argv)
59 59
60 fd = open("/dev/tty0", O_RDWR); 60 fd = open("/dev/tty0", O_RDWR);
61 if (fd < 0) { 61 if (fd < 0) {
62 fprintf(stderr, "Error opening /dev/tty0: %s\n", strerror(errno)); 62 errorMsg("Error opening /dev/tty0: %s\n", strerror(errno));
63 exit(FALSE); 63 exit(FALSE);
64 } 64 }
65 65
66 read(0, buff, 7); 66 read(0, buff, 7);
67 if (0 != strncmp(buff, magic, 7)) { 67 if (0 != strncmp(buff, magic, 7)) {
68 fprintf(stderr, "This is not a valid binary keymap.\n"); 68 errorMsg("This is not a valid binary keymap.\n");
69 exit(FALSE); 69 exit(FALSE);
70 } 70 }
71 71
72 if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS)) { 72 if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS)) {
73 fprintf(stderr, "Error reading keymap flags: %s\n", 73 errorMsg("Error reading keymap flags: %s\n",
74 strerror(errno)); 74 strerror(errno));
75 exit(FALSE); 75 exit(FALSE);
76 } 76 }
77 77
78 ibuff = (u_short *) malloc(ibuffsz); 78 ibuff = (u_short *) malloc(ibuffsz);
79 if (!ibuff) { 79 if (!ibuff) {
80 fprintf(stderr, "Out of memory.\n"); 80 errorMsg("Out of memory.\n");
81 exit(FALSE); 81 exit(FALSE);
82 } 82 }
83 83
@@ -87,7 +87,7 @@ int loadkmap_main(int argc, char **argv)
87 while (pos < ibuffsz) { 87 while (pos < ibuffsz) {
88 if ((readsz = read(0, (char *) ibuff + pos, ibuffsz - pos)) 88 if ((readsz = read(0, (char *) ibuff + pos, ibuffsz - pos))
89 < 0) { 89 < 0) {
90 fprintf(stderr, "Error reading keymap: %s\n", 90 errorMsg("Error reading keymap: %s\n",
91 strerror(errno)); 91 strerror(errno));
92 exit(FALSE); 92 exit(FALSE);
93 } 93 }