diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-12-22 19:21:04 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-01-22 23:09:12 +0100 |
commit | e0abeaccefe78a0484f6cb8dbc71151c88c5f16d (patch) | |
tree | 475bc528ad441f97e9c389e1d15be1190ce131fa /lib/efi_selftest | |
parent | 6a380e5b66120133dd56f1c73118e2f76e3041c7 (diff) |
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>
Diffstat (limited to 'lib/efi_selftest')
-rw-r--r-- | lib/efi_selftest/efi_selftest_console.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/efi_selftest/efi_selftest_console.c b/lib/efi_selftest/efi_selftest_console.c index 6a7fd20da5..963ed913db 100644 --- a/lib/efi_selftest/efi_selftest_console.c +++ b/lib/efi_selftest/efi_selftest_console.c @@ -142,7 +142,7 @@ void efi_st_printf(const char *fmt, ...) const char *c; u16 *pos = buf; const char *s; - const u16 *u; + u16 *u; va_start(args, fmt); @@ -188,9 +188,13 @@ void efi_st_printf(const char *fmt, ...) /* u16 string */ case 's': u = va_arg(args, u16*); - /* Ensure string fits into buffer */ - for (; *u && pos < buf + 120; ++u) - *pos++ = *u; + if (pos > buf) { + *pos = 0; + con_out->output_string(con_out, + buf); + } + con_out->output_string(con_out, u); + pos = buf; break; default: --c; |