| 68 | } |
| 69 | |
| 70 | static xmlNode * |
| 71 | find_resource(xmlNode * cib_node, const char *resource) |
| 72 | { |
| 73 | char *xpath = NULL; |
| 74 | xmlNode *match = NULL; |
| 75 | const char *node = crm_element_value(cib_node, XML_ATTR_UNAME); |
| 76 | int max = strlen(rsc_template) + strlen(resource) + strlen(node) + 1; |
| 77 | |
| 78 | xpath = calloc(1, max); |
| 79 | |
| 80 | snprintf(xpath, max, rsc_template, node, resource); |
| 81 | match = get_xpath_object(xpath, cib_node, LOG_DEBUG_2); |
| 82 | |
| 83 | free(xpath); |
| 84 | return match; |
| 85 | } |
| 86 | |
| 87 | static void |
| 88 | create_node_entry(cib_t * cib_conn, char *node) |
no test coverage detected