libbootmsg: Do not use '\b' characters when printing checkpoints

Using backspaces after printing out the checkpoint numbers is fine
when printing to terminals. But if the output of SLOF is placed
into a log file instead, this can confuse certain readers like
Firefox to interpret the log file as a binary file instead of text.
To avoid this problem, we can also use '\r' to move the cursor
back to the beginning - this should be fine since the checkpoints
are always printed at the beginning of a line anyway. And '\r' is
then interpreted as normal text, not as a potential binary file byte.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Thomas Huth 2016-02-24 10:08:17 +01:00 committed by Alexey Kardashevskiy
parent e56149ca79
commit 126e458fdc
1 changed files with 2 additions and 4 deletions

View File

@ -58,10 +58,8 @@ ENTRY(bootmsg_cp)
bl io_putchar // print character
mr r3, r9
bl io_printhex16 // print checkpoint ID
.rept 5
li r3,'\b'
bl io_putchar // print backspaces
.endr
li r3,'\r'
bl io_putchar // go back
mtlr r11
blr