[Skiboot] [PATCH RFC v2 05/12] opal-prd: implement basic heuristic for hservice_puts loglevels
Jeremy Kerr
jk at ozlabs.org
Fri May 26 12:54:24 AEST 2017
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
external/opal-prd/opal-prd.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index d3c83b7..18a3d43 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -270,7 +270,14 @@ extern int call_run_command(int argc, const char **argv, char **o_outString);
void hservice_puts(const char *str)
{
- pr_log(LOG_INFO, "HBRT: %s", str);
+ int priority = LOG_INFO;
+
+ if (strcasestr(str, "error"))
+ priority = LOG_ERR;
+ else if (strcasestr(str, "warn"))
+ priority = LOG_WARNING;
+
+ pr_log(priority, "HBRT: %s", str);
}
void hservice_assert(void)
--
2.7.4
More information about the Skiboot
mailing list