[Skiboot] [PATCH RFC 05/12] opal-prd: implement basic heuristic for hservice_puts loglevels
Daniel M Crowell
dcrowell at us.ibm.com
Sat Jun 3 11:48:06 AEST 2017
So what will the actual result of these changes be? Is this going to
change where our messages show up?
--
Dan Crowell
Senior Software Engineer - Power Systems Enablement Firmware
IBM Rochester: t/l 553-2987
dcrowell at us.ibm.com
From: Jeremy Kerr <jk at ozlabs.org>
To: skiboot at lists.ozlabs.org
Cc: Dan Crowell <dcrowell at us.ibm.com>, Jeremy Kerr <jk at ozlabs.org>
Date: 05/25/2017 02:06 AM
Subject: [PATCH RFC 05/12] opal-prd: implement basic heuristic for
hservice_puts loglevels
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/skiboot/attachments/20170602/7402e0d4/attachment.html>
More information about the Skiboot
mailing list