aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index f969124c1..2fcb0d902 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);
}