Use errorMsg rather than fprintf.

This commit is contained in:
Matt Kraai
2000-07-14 01:51:25 +00:00
parent 4ac6cb534d
commit d537a95fdb
81 changed files with 391 additions and 473 deletions

View File

@@ -59,25 +59,25 @@ int loadkmap_main(int argc, char **argv)
fd = open("/dev/tty0", O_RDWR);
if (fd < 0) {
fprintf(stderr, "Error opening /dev/tty0: %s\n", strerror(errno));
errorMsg("Error opening /dev/tty0: %s\n", strerror(errno));
exit(FALSE);
}
read(0, buff, 7);
if (0 != strncmp(buff, magic, 7)) {
fprintf(stderr, "This is not a valid binary keymap.\n");
errorMsg("This is not a valid binary keymap.\n");
exit(FALSE);
}
if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS)) {
fprintf(stderr, "Error reading keymap flags: %s\n",
errorMsg("Error reading keymap flags: %s\n",
strerror(errno));
exit(FALSE);
}
ibuff = (u_short *) malloc(ibuffsz);
if (!ibuff) {
fprintf(stderr, "Out of memory.\n");
errorMsg("Out of memory.\n");
exit(FALSE);
}
@@ -87,7 +87,7 @@ int loadkmap_main(int argc, char **argv)
while (pos < ibuffsz) {
if ((readsz = read(0, (char *) ibuff + pos, ibuffsz - pos))
< 0) {
fprintf(stderr, "Error reading keymap: %s\n",
errorMsg("Error reading keymap: %s\n",
strerror(errno));
exit(FALSE);
}