take over kernel baudrate for getty
Denys Vlasenko
vda.linux at googlemail.com
Sun Apr 12 12:44:05 UTC 2009
On Thursday 09 April 2009 09:08, Mike Frysinger wrote:
> On Monday 06 April 2009 15:06:38 Guenter wrote:
> > Stuart Hughes schrieb:
> > > FWIW, I wrote a hack to busybox to do this a while ago, you can find it
> > > here (it's part of LTIB):
> > > http://www.bitshrine.org/gpp/busybox-1.11.2-getty-nobaud-1.patch
> >
> > thank you very much!! That's exactly what I was after; I did just test
> > the patch, and can confirm that it works also great for my usage.
> > Attached the slightly modified patch based on Mike's comments.
>
> merged, cheers
parse_speeds is called from parse_args. parse_args is called before this:
open_tty(options.tty);
ndelay_off(0);
debug("duping\n");
xdup2(0, 1);
xdup2(0, 2);
therefore parse_speeds uses wrong fd 1 here:
if (op->speeds[op->numspeed] == 0) {
struct termios tio;
if (tcgetattr(1, &tio) != 0)
bb_error_msg_and_die("auto baudrate detection failed");
op->speeds[op->numspeed] = cfgetospeed(&tio);
}
fd 1 is not open to tty we are interested in at this moment.
--
vda
More information about the busybox
mailing list