[Skiboot] [PATCH] opal-prd: flush after logging to stdio in debug mode

Jeremy Kerr jk at ozlabs.org
Thu Nov 9 11:32:31 AEDT 2017


When in debug mode, flush after each log output. This makes it more
likely that we'll catch failure reasons on severe errors.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
 external/opal-prd/opal-prd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index c26cc95..b15063f 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -192,6 +192,9 @@ static void pr_log_stdio(int priority, const char *fmt, va_list ap)
 
 	vprintf(fmt, ap);
 	printf("\n");
+
+	if (ctx->debug)
+		fflush(stdout);
 }
 
 /* standard logging prefixes:
-- 
2.7.4



More information about the Skiboot mailing list