xmlSetProp(xml_node, XML_FAILCIB_ATTR_RESID, ID(target)); xmlSetProp(xml_node, XML_LRM_ATTR_OP, operation); xmlSetProp(xml_node, XML_LRM_ATTR_RESSTATUS, status);
set_xml_property_copy(xml_node, XML_FAILCIB_ATTR_RESID, ID(target)); set_xml_property_copy(xml_node, XML_LRM_ATTR_OP, operation); set_xml_property_copy(xml_node, XML_LRM_ATTR_RESSTATUS, status);
conditional_add_failure(xmlNodePtr failed, xmlNodePtr target, const char *operation, const char *status, int return_code){  gboolean was_error = FALSE;  if(return_code < 0)    {      was_error = TRUE;      // do some fabulous logging            xmlNodePtr xml_node = xmlNewNode(NULL, XML_FAIL_TAG_RESOURCE);      xmlSetProp(xml_node, XML_FAILCIB_ATTR_RESID, ID(target));      xmlSetProp(xml_node, XML_LRM_ATTR_OP, operation);      xmlSetProp(xml_node, XML_LRM_ATTR_RESSTATUS, status);      char buffer[20]; // will handle 64 bit integers      /* for now just put in the return code       * later, convert it to text based on the operation       */      sprintf(buffer, "%d", return_code);      xmlSetProp(xml_node, XML_FAILRES_ATTR_REASON, buffer);            xmlAddChild(failed, xml_node);    }  return was_error;}