Skip to content
Commit 0bbf27d9 authored by Ryan Roberts's avatar Ryan Roberts
Browse files

run: Fix extra LFs and ignored CRs in output



We were previously converting UART output to strings using Python's
universal newline technique, where '\r', '\n' and '\r\n' were all
replaced with '\n'. This caused a few issues; First, telnet would
occasionally output '\r\r\n' which would get converted to 2 newlines,
whereas only one was intended. Secondly, we were swallowing legitimate
'\r's when working at the interactive shell and the cursor would
occasionally get messed up.

Solve this by never converting line endings when converting the binary
data to string data. As a result we must be more carefull with '\r'
since they may now exist in the stream.

Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 8e97737b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment