On Friday 11 April 2008 01:17, Nate Case wrote: > The ioctl_*() and bb_xioctl*() functions declare the second argument as > "int request" rather than "unsigned long int request" which break the > ioctl() calls on 64-bit systems. > > This bug presented itself in the form of login failing during the > termios TCSETS call on my ppc64 board: > > getty: /dev/ttyS0: TCSETS: Invalid argument > > I verified that changing the "request" argument to "unsigned long int" > fixes the problem. It should leave 32-bit systems unaffected. > > I also reported this issue on the bug tracker and included patches: > > http://busybox.net/bugs/view.php?id=2884 > > --- > Note: This patch is against the unstable trunk. See bug report for > patch against stable branch.
I want to understand the failure. Please apply this patch, run failing getty and let us know what did you see. -- vda
diff -d -urpN busybox.8/libbb/xfuncs_printf.c busybox.9/libbb/xfuncs_printf.c --- busybox.8/libbb/xfuncs_printf.c 2008-04-09 02:23:48.000000000 +0200 +++ busybox.9/libbb/xfuncs_printf.c 2008-04-11 02:11:16.000000000 +0200 @@ -456,6 +456,8 @@ int ioctl_or_perror_and_die(int fd, int int ret; va_list p; +bb_error_msg("request %x argp %p", request, argp); + ret = ioctl(fd, request, argp); if (ret < 0) { va_start(p, fmt); diff -d -urpN busybox.8/loginutils/getty.c busybox.9/loginutils/getty.c --- busybox.8/loginutils/getty.c 2008-04-06 07:33:52.000000000 +0200 +++ busybox.9/loginutils/getty.c 2008-04-11 02:12:29.000000000 +0200 @@ -561,6 +561,7 @@ static void termios_final(struct options #endif /* Finally, make the new settings effective */ +bb_error_msg("termios_final: request %x argp %p", TCSETS, tp); ioctl_or_perror_and_die(0, TCSETS, tp, "%s: TCSETS", op->tty); } @@ -692,6 +693,7 @@ int getty_main(int argc ATTRIBUTE_UNUSED * by patching the SunOS kernel variable "zsadtrlow" to a larger value; * 5 seconds seems to be a good value. */ +bb_error_msg("getty_main: request %x argp %p", TCGETS, &termios); ioctl_or_perror_and_die(0, TCGETS, &termios, "%s: TCGETS", options.tty); #ifdef __linux__
_______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox