From: Michael Brown Date: Sun, 7 Sep 2008 21:08:40 +0000 (+0100) Subject: [util] Disable automatic CR->LF conversion in serial-console utility X-Git-Url: http://git.etherboot.org/people/pcmattman/gpxe.git/commitdiff_plain/8223084afc206000312611a3fcfa30a28500d1a3 [util] Disable automatic CR->LF conversion in serial-console utility DUET (the EFI test environment) seems not to handle LF, so inhibit the CR->LF conversion that the pty does for us by default. This doesn't affect operation of gPXE, which will happily accept either CR or LF. --- diff --git a/contrib/bochs/serial-console b/contrib/bochs/serial-console index cc4fd005..8cd3835c 100755 --- a/contrib/bochs/serial-console +++ b/contrib/bochs/serial-console @@ -224,8 +224,8 @@ if ( -t STDIN ) { $restore_termios = POSIX::Termios->new; $termios->getattr ( fileno(STDIN) ); $restore_termios->getattr ( fileno(STDIN) ); - $termios->setlflag ( $termios->getlflag & - ~(ICANON) & ~(ECHO) ); + $termios->setlflag ( $termios->getlflag & ~(ICANON) & ~(ECHO) ); + $termios->setiflag ( $termios->getiflag & ~(ICRNL) ); $termios->setattr ( fileno(STDIN), TCSANOW ); }