mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +00:00
efi_selftest: do not cut off u16 strings when printing
Device paths can be very long. Due to a limited output buffer the output for device paths is cut off. We can avoid this by directly calling the boottime service with the the device path string. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> [agraf: Remove coloring code change] Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
6a380e5b66
commit
e0abeaccef
1 changed files with 8 additions and 4 deletions
|
@ -142,7 +142,7 @@ void efi_st_printf(const char *fmt, ...)
|
||||||
const char *c;
|
const char *c;
|
||||||
u16 *pos = buf;
|
u16 *pos = buf;
|
||||||
const char *s;
|
const char *s;
|
||||||
const u16 *u;
|
u16 *u;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
|
||||||
|
@ -188,9 +188,13 @@ void efi_st_printf(const char *fmt, ...)
|
||||||
/* u16 string */
|
/* u16 string */
|
||||||
case 's':
|
case 's':
|
||||||
u = va_arg(args, u16*);
|
u = va_arg(args, u16*);
|
||||||
/* Ensure string fits into buffer */
|
if (pos > buf) {
|
||||||
for (; *u && pos < buf + 120; ++u)
|
*pos = 0;
|
||||||
*pos++ = *u;
|
con_out->output_string(con_out,
|
||||||
|
buf);
|
||||||
|
}
|
||||||
|
con_out->output_string(con_out, u);
|
||||||
|
pos = buf;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
--c;
|
--c;
|
||||||
|
|
Loading…
Add table
Reference in a new issue