MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / find_entity

Function find_entity

lib/common/xml.c:198–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198xmlNode*
199find_entity(xmlNode *parent, const char *node_name, const char *id)
200{
201 xmlNode *a_child = NULL;
202 for(a_child = __xml_first_child(parent); a_child != NULL; a_child = __xml_next(a_child)) {
203 /* Uncertain if node_name == NULL check is strictly necessary here */
204 if(node_name == NULL || strcmp((const char *)a_child->name, node_name) == 0) {
205 if(id == NULL || strcmp(id, ID(a_child)) == 0) {
206 crm_trace("returning node (%s).",
207 crm_element_name(a_child));
208 return a_child;
209 }
210 }
211 }
212
213 crm_trace("node <%s id=%s> not found in %s.",
214 node_name, id, crm_element_name(parent));
215 return NULL;
216}
217
218void
219copy_in_properties(xmlNode* target, xmlNode *src)

Callers 7

delete_cib_objectFunction · 0.85
update_cib_objectFunction · 0.85
add_cib_objectFunction · 0.85
create_operation_updateFunction · 0.85
subtract_xml_objectFunction · 0.85
add_xml_objectFunction · 0.85
unpack_templateFunction · 0.85

Calls 2

__xml_first_childFunction · 0.85
__xml_nextFunction · 0.85

Tested by

no test coverage detected