mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
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:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user