@@ -143,10 +143,12 @@ void efi_st_printc(int color, const char *fmt, ...)
const char *c;
u16 *pos = buf;
const char *s;
- const u16 *u;
+ u16 *u;
va_start(args, fmt);
+ if (color >= 0)
+ con_out->set_attribute(con_out, (unsigned long)color);
c = fmt;
for (; *c; ++c) {
switch (*c) {
@@ -189,9 +191,13 @@ void efi_st_printc(int color, 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;
@@ -216,8 +222,6 @@ void efi_st_printc(int color, const char *fmt, ...)
}
va_end(args);
*pos = 0;
- if (color >= 0)
- con_out->set_attribute(con_out, (unsigned long)color);
con_out->output_string(con_out, buf);
if (color >= 0)
con_out->set_attribute(con_out, EFI_LIGHTGRAY);
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> --- lib/efi_selftest/efi_selftest_console.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)