README.md
September 19, 2017 ยท View on GitHub
This is a fixed-up version of edk2's StdLib/LibC/Uefi/InteractiveIO, the
line discipline porition of StdLib.
NOTE: StdExtLib, StdLibDevConsole, StdLibInteractiveIO and StdLibUefi all go together.
Differences:
- Honor
c_cc[VEOF]asWEOF, breaking out of input on^D. - Do not treat errors (inside
IIO_GetInChar) asWEOF. - Properly percolate
IIO_GetInCharerrors throughIIO_CanonRead. - Properly percolate
IIO_CanonRead/IIO_NonCanonReadreturn values throughIIO_Read, making errors and 0 (e.g.VEOF) work correctly. - Default
VQUITandVINTRto abort ongoing I/O withEIO. - No default Termios initialization.
- Fix
IIO_Echocallingfo_writewith 0 bytes. - Fix
IIO_Writecalllingfo_writewith 0 bytes (not seen in the wild, but...) - Fix
IIO_Writeincorrectly treating CharLen as signed size, leading to crashes and unpredictable behavior on writes of binary data through IIO. - Fix
IIO_Writeto allow printing wide NULs. - Drop UTF8 support entirely. "POSIX" side is taken to be single-byte only. This may seem like loss of functionality, but in practice it will make, when combined with special "narrow" stdin/stdout variants and redirection, the UNIX tools work as expected on binary data (without corrupting it).
It seem InteractiveIO is its own ad-hoc, and very buggy implementation
of a line discipline. That seems like a mistake. Many issues exist
because I/O is done through the UEFI Shell and that expects UTF16-coded
data (the weird Shell 'narrow' |a <a and >a are just broken as they
expect printable NUL-terminated UTF16).