[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] xen/console: Fix build when CONFIG_DEBUG_TRACE=y



commit e0bf98394ee06b9f365684269b1de091c31d8d9c
Author:     Julien Grall <julien.grall@xxxxxxx>
AuthorDate: Mon Aug 19 18:13:05 2019 +0100
Commit:     Julien Grall <julien.grall@xxxxxxx>
CommitDate: Wed Aug 21 18:33:53 2019 +0100

    xen/console: Fix build when CONFIG_DEBUG_TRACE=y
    
    Commit b5e6e1ee8da "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@xxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/char/console.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 2c14c2ca73..75e493466e 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -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);
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.