diff options
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/getty.c | 6 | ||||
-rw-r--r-- | loginutils/vlock.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index f969124..2fcb0d9 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -281,8 +281,7 @@ static void open_tty(const char *tty, struct termios *tp, int local) * 5 seconds seems to be a good value. */ - if (ioctl(0, TCGETS, tp) < 0) - bb_perror_msg_and_die("%s: ioctl(TCGETS)", tty); + ioctl_or_perror_and_die(0, TCGETS, tp, "%s: TCGETS", tty); /* * It seems to be a terminal. Set proper protections and ownership. Mode @@ -647,8 +646,7 @@ static void termios_final(struct options *op, struct termios *tp, struct chardat /* Finally, make the new settings effective */ - if (ioctl(0, TCSETS, tp) < 0) - bb_perror_msg_and_die("%s: ioctl(TCSETS)", op->tty); + ioctl_or_perror_and_die(0, TCSETS, tp, "%s: TCSETS", op->tty); } diff --git a/loginutils/vlock.c b/loginutils/vlock.c index 7f614fc..665ebd8 100644 --- a/loginutils/vlock.c +++ b/loginutils/vlock.c @@ -62,9 +62,7 @@ int vlock_main(int argc, char **argv) vfd = xopen(CURRENT_TTY, O_RDWR); - if (ioctl(vfd, VT_GETMODE, &vtm) < 0) { - bb_perror_msg_and_die("VT_GETMODE"); - } + xioctl(vfd, VT_GETMODE, &vtm); /* mask a bunch of signals */ sigprocmask(SIG_SETMASK, NULL, &sig); |