Replace %m GNUism with strerror(errno)

Even musl libc supports %m today, as well as most syslog daemons, but
that's no excuse to use this.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-02-07 13:21:55 +01:00
parent 3e8d63c29c
commit fccba7cd4c
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -249,7 +249,7 @@ static void prepare_tty(char *tty, speed_t speed, char *procname, struct rlimit
fd = open(tty, O_RDWR);
if (fd < 0) {
logit(LOG_ERR, "Failed opening %s: %m", tty);
logit(LOG_ERR, "Failed opening %s: %s", tty, strerror(errno));
_exit(1);
}
@@ -259,7 +259,7 @@ static void prepare_tty(char *tty, speed_t speed, char *procname, struct rlimit
close(fd);
if (ioctl(STDIN_FILENO, TIOCSCTTY, 1) < 0)
logit(LOG_WARNING, "Failed TIOCSCTTY on %s: %m", tty);
logit(LOG_WARNING, "Failed TIOCSCTTY on %s: %s", tty, strerror(errno));
/*
* Reset to sane defaults in case of messup from prev. session