[Skiboot] [PATCH RFC 05/12] opal-prd: implement basic heuristic for hservice_puts loglevels
Jeremy Kerr
jk at ozlabs.org
Thu May 25 17:05:48 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 6ac8a20..c10803d 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -267,7 +267,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