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:
parent
e56149ca79
commit
126e458fdc
|
@ -58,10 +58,8 @@ ENTRY(bootmsg_cp)
|
||||||
bl io_putchar // print character
|
bl io_putchar // print character
|
||||||
mr r3, r9
|
mr r3, r9
|
||||||
bl io_printhex16 // print checkpoint ID
|
bl io_printhex16 // print checkpoint ID
|
||||||
.rept 5
|
li r3,'\r'
|
||||||
li r3,'\b'
|
bl io_putchar // go back
|
||||||
bl io_putchar // print backspaces
|
|
||||||
.endr
|
|
||||||
mtlr r11
|
mtlr r11
|
||||||
blr
|
blr
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue