[1.16.2] Can't stop "ping" with CTRL+c
Kevin Cernekee
cernekee at gmail.com
Fri Jul 8 05:31:19 UTC 2011
On Thu, Jul 7, 2011 at 9:15 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> It may be a good idea to teach ctty hack to look
> at /sys/class/tty/console/active.
OK, I can submit a patch for this. One of the cases I'd like to
support in my rootfs is console on /dev/ttyAMA0, and the existing
logic can only handle tty<n> / ttyS<n>.
Could you please clarify one thing:
#ifdef TIOCGSERIAL
else if (ioctl(0, TIOCGSERIAL, &u.sr) == 0) {
/* this is a serial console */
sprintf(console + 8, "S%d", u.sr.line);
}
#endif
#ifdef __linux__
else if (ioctl(0, VT_GETSTATE, &u.vt) == 0) {
/* this is linux virtual tty */
sprintf(console + 8, "S%d" + 1, u.vt.v_active);
}
#endif
What would cause TIOCGSERIAL to be undefined while __linux__ is
defined, or vice versa? Is that intended to support really old
kernels, broken system headers, or something else?
Thanks.
More information about the busybox
mailing list