This is the bb_ioctl patch for loginutils.
Ciao,
Tito
--- busybox.orig/loginutils/getty.c 2007-05-26 23:23:54.000000000 +0200
+++ busybox/loginutils/getty.c 2007-07-09 21:54:43.000000000 +0200
@@ -281,8 +281,7 @@
* 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_vperror_and_die(0, TCGETS, tp, "%s: TCGETS", tty);
/*
* It seems to be a terminal. Set proper protections and ownership. Mode
@@ -647,8 +646,7 @@
/* Finally, make the new settings effective */
- if (ioctl(0, TCSETS, tp) < 0)
- bb_perror_msg_and_die("%s: ioctl(TCSETS)", op->tty);
+ ioctl_or_vperror_and_die(0, TCSETS, tp, "%s: TCSETS", op->tty);
}
--- busybox.orig/loginutils/vlock.c 2007-05-26 23:23:54.000000000 +0200
+++ busybox/loginutils/vlock.c 2007-07-05 23:19:11.000000000 +0200
@@ -62,9 +62,7 @@
vfd = xopen(CURRENT_TTY, O_RDWR);
- if (ioctl(vfd, VT_GETMODE, &vtm) < 0) {
- bb_perror_msg_and_die("VT_GETMODE");
- }
+ ioctl_or_die(vfd, VT_GETMODE, &vtm);
/* mask a bunch of signals */
sigprocmask(SIG_SETMASK, NULL, &sig);
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox