1 file changed, 7 insertions(+), 7 deletions(-) tools/crm_mon.c | 14 +++++++-------
# HG changeset patch # User Andrew Beekhof <[EMAIL PROTECTED]> # Date 1226395131 -3600 # Branch stable-1.0 # Node ID 7aced6ba1f3137d8a2f2b34126c8b2403d7bd612 # Parent 38203f5ff9728096eb3bd86b6946d75c728e7a98 Medium: Tools: crm_mon - display the meaning of the operation's rc code instead of the status diff --git a/tools/crm_mon.c b/tools/crm_mon.c --- a/tools/crm_mon.c +++ b/tools/crm_mon.c @@ -844,15 +844,15 @@ print_status(xmlNode *cib) print_as("\nFailed actions:\n"); xml_child_iter(data_set.failed, xml_op, const char *id = ID(xml_op); - const char *rc = crm_element_value(xml_op, XML_LRM_ATTR_RC); + const char *last = crm_element_value(xml_op, "last_run"); const char *node = crm_element_value(xml_op, XML_ATTR_UNAME); - const char *last = crm_element_value(xml_op, "last_run"); + const char *rc_s = crm_element_value(xml_op, XML_LRM_ATTR_RC); const char *call = crm_element_value(xml_op, XML_LRM_ATTR_CALLID); - const char *status_s = crm_element_value(xml_op, XML_LRM_ATTR_OPSTATUS); - int status = crm_parse_int(status_s, "0"); + const char *status = crm_element_value(xml_op, XML_LRM_ATTR_OPSTATUS); + int rc = crm_parse_int(rc_s, "0"); - print_as(" %s (node=%s, call=%s, rc=%s", - id, node, call, rc); + print_as(" %s (node=%s, call=%s, rc=%d, status=%s", + id, node, call, rc, status); if(last) { time_t run_at = crm_parse_int(last, "0"); print_as(", last-run=%s, queued=%sms, exec=%sms\n", @@ -860,7 +860,7 @@ print_status(xmlNode *cib) crm_element_value(xml_op, "exec_time"), crm_element_value(xml_op, "queue_time")); } - print_as("): %s\n", op_status2text(status)); + print_as("): %s\n", execra_code2string(rc)); ); }
_______________________________________________ Pacemaker mailing list Pacemaker@clusterlabs.org http://list.clusterlabs.org/mailman/listinfo/pacemaker