From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Julien Grall <julien.grall@arm.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [Xen-devel] [PATCH] xen/console: Fix build when CONFIG_DEBUG_TRACE=y
Date: Mon, 19 Aug 2019 19:01:25 +0100 [thread overview]
Message-ID: <20190819180125.17504-1-julien.grall@arm.com> (raw)
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@arm.com>
---
xen/drivers/char/console.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 2c14c2ca73..924d4971ca 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -1185,11 +1185,12 @@ 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]);
+ 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);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2019-08-19 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 18:01 Julien Grall [this message]
2019-08-19 18:04 ` [Xen-devel] [PATCH] xen/console: Fix build when CONFIG_DEBUG_TRACE=y Andrew Cooper
2019-08-19 18:37 ` Julien Grall
2019-08-20 13:12 ` Andrew Cooper
2019-08-21 17:30 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190819180125.17504-1-julien.grall@arm.com \
--to=julien.grall@arm.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).