<font size=2 face="sans-serif">Looks good to me.</font><br><font size=2 face="sans-serif"><br>--<br>Dan Crowell<br>Senior Software Engineer - Power Systems Enablement Firmware<br>IBM Rochester: t/l 553-2987<br>dcrowell@us.ibm.com</font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Jeremy Kerr <jk@ozlabs.org></font><br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">skiboot@lists.ozlabs.org</font><br><font size=1 color=#5f5f5f face="sans-serif">Cc:
</font><font size=1 face="sans-serif">Dan Crowell <dcrowell@us.ibm.com>,
Frederic Bonnard <FREDERIC@fr.ibm.com>, Jeremy Kerr <jk@ozlabs.org></font><br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">06/05/2017 08:05 PM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[PATCH v3 05/12]
opal-prd: interpret log level prefixes from HBRT</font><br><hr noshade><br><br><br><tt><font size=2>Interpret the (optional) *_MRK log prefixes on HBRT
messages, and set<br>the syslog log priority to suit.<br><br>Signed-off-by: Jeremy Kerr <jk@ozlabs.org><br><br>---<br>v3:<br> Parse priority from HBRT log prefixes<br><br>---<br> external/opal-prd/opal-prd.c | 20 +++++++++++++++++++-<br> 1 file changed, 19 insertions(+), 1 deletion(-)<br><br>diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c<br>index d3c83b7..7113a35 100644<br>--- a/external/opal-prd/opal-prd.c<br>+++ b/external/opal-prd/opal-prd.c<br>@@ -270,7 +270,25 @@ extern int call_run_command(int argc, const char **argv,
char **o_outString);<br> <br> void hservice_puts(const char *str)<br> {<br>-
pr_log(LOG_INFO, "HBRT: %s", str);<br>+
int priority = LOG_INFO;<br>+<br>+
/* Interpret the 2-character ERR_MRK/FAIL_MRK/WARN_MRK prefixes that<br>+
* may be present on HBRT log messages, and bump the log priority
as<br>+
* appropriate.<br>+
*/<br>+
if (strlen(str) >= 2 && str[1] == '>') {<br>+
switch
(str[0]) {<br>+
case
'E':<br>+
case
'F':<br>+
priority = LOG_ERR;<br>+
break;<br>+
case
'W':<br>+
priority = LOG_WARNING;<br>+
break;<br>+
}<br>+
}<br>+<br>+
pr_log(priority, "HBRT: %s", str);<br> }<br> <br> void hservice_assert(void)<br>-- <br>2.7.4<br><br></font></tt><br><br><BR>