aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2017-11-09 08:32:31 +0800
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-11-13 23:48:52 -0600
commit88bd3bc5e6f8174e36d28159454ecddddf4fb12b (patch)
treebedc8b7a3a8a856f80723a090bb1b2c56edfcd30 /external
parent8ca2d61f3b4bac88d9d676bf305f1ee2956ce6ad (diff)
downloadskiboot-88bd3bc5e6f8174e36d28159454ecddddf4fb12b.zip
skiboot-88bd3bc5e6f8174e36d28159454ecddddf4fb12b.tar.gz
skiboot-88bd3bc5e6f8174e36d28159454ecddddf4fb12b.tar.bz2
opal-prd: flush after logging to stdio in debug mode
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@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/opal-prd/opal-prd.c3
1 files changed, 3 insertions, 0 deletions
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: