Change calls to error_msg.* and strerror to use perror_msg.*.
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 3ff5ef6..c5a2ea7 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -50,7 +50,7 @@
fd = open("/dev/tty0", O_RDWR);
if (fd < 0) {
- error_msg("Error opening /dev/tty0: %s\n", strerror(errno));
+ perror_msg("Error opening /dev/tty0");
return EXIT_FAILURE;
}
diff --git a/console-tools/loadacm.c b/console-tools/loadacm.c
index a696640..52702bf 100644
--- a/console-tools/loadacm.c
+++ b/console-tools/loadacm.c
@@ -39,13 +39,11 @@
fd = open("/dev/tty", O_RDWR);
if (fd < 0) {
- error_msg("Error opening /dev/tty1: %s\n", strerror(errno));
- return EXIT_FAILURE;
+ perror_msg_and_die("Error opening /dev/tty1");
}
if (screen_map_load(fd, stdin)) {
- error_msg("Error loading acm: %s\n", strerror(errno));
- return EXIT_FAILURE;
+ perror_msg_and_die("Error loading acm");
}
write(fd, "\033(K", 3);