xen/console: Fix build when CONFIG_DEBUG_TRACE=y

Commit b5e6e1ee8d "xen/console: Don't treat NUL character as the end
of the buffer" extended sercon_puts to take the number of character
to print in argument.

Sadly, a couple of couple of the callers in debugtrace_dump_worker()
were not converted. This result to a build failure when enabling
CONFIG_DEBUG_TRACE.

Spotted by Travis using randconfig
Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Julien Grall committed 2019-08-21 18:33:53 +01:00
1 parent 7c7f7e8fba
commit e0bf98394e
1 file changed
+4 -2
+4 -2
View File
@@ -1185,11 +1185,13 @@ static void debugtrace_dump_worker(void)
/* Print oldest portion of the ring. */
ASSERT(debugtrace_buf[debugtrace_bytes - 1] == 0);
sercon_puts(&debugtrace_buf[debugtrace_prd]);
if ( debugtrace_buf[debugtrace_prd] != '\0' )
sercon_puts(&debugtrace_buf[debugtrace_prd],
strlen(&debugtrace_buf[debugtrace_prd]));
/* Print youngest portion of the ring. */
debugtrace_buf[debugtrace_prd] = '\0';
sercon_puts(&debugtrace_buf[0]);
sercon_puts(&debugtrace_buf[0], debugtrace_prd);
memset(debugtrace_buf, '\0', debugtrace_bytes);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.