patman: Support limiting output to a single line
authorSimon Glass <sjg@chromium.org>
Thu, 9 Apr 2020 21:08:41 +0000 (15:08 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 21 Apr 2020 12:33:47 +0000 (06:33 -0600)
commit1e13047a75ca9a74671e886338de30c443d4a968
treeb617977b838bd32291f1425e20a4747940c9ff27
parent37b224f9f136f83f22de9221d48d9a0b1b2c3693
patman: Support limiting output to a single line

When outputing a progress line we don't want it to go past the end of the
current terminal line, or it will not be possible to erase it. Add an
option to Print() which allows limiting the output to the terminal width.

Since ANSI sequences do not take up space on the terminal, these are
removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/terminal.py