2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-23 19:51:46 +00:00

[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.
This commit is contained in:
Michael Brown 2008-09-07 22:08:40 +01:00
parent 18aa0e79d2
commit 8223084afc

View File

@ -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 );
}