}
);
do_find_resource(const char *rsc, xmlNodePtr xml_node){	int found = 0;	const char *path[] = {		XML_TAG_CIB,		XML_CIB_TAG_STATUS,		XML_CIB_TAG_STATE	};	const char *path2[] = {		XML_CIB_TAG_LRM,		XML_LRM_TAG_RESOURCES,		XML_LRM_TAG_RESOURCE	};	xmlNodePtr nodestates = find_xml_node_nested(		xml_node, path, DIMOF(path));	while(nodestates != NULL) {		xmlNodePtr rscstates = NULL;		xmlNodePtr a_node = nodestates;		nodestates = nodestates->next;		if(is_node_online(a_node) == FALSE) {			crm_debug("Skipping offline node: %s",				xmlGetProp(a_node, XML_ATTR_ID));			continue;		}				rscstates = find_xml_node_nested(a_node, path2, DIMOF(path2));				while(rscstates != NULL) {			const char *id = xmlGetProp(rscstates,XML_ATTR_ID);			const char *target =				xmlGetProp(rscstates,XML_LRM_ATTR_TARGET);			const char *last_op =				xmlGetProp(rscstates,XML_LRM_ATTR_LASTOP);			const char *op_code =				xmlGetProp(rscstates,XML_LRM_ATTR_OPSTATUS);			rscstates = rscstates->next;						crm_debug("checking %s:%s for %s", target, id, rsc);			if(safe_str_neq(rsc, id)){				crm_trace("no match");				continue;			}						if(safe_str_eq("stop", last_op)) {				crm_debug("resource %s is stopped on: %s\n",					  rsc, target);							} else if(safe_str_eq(op_code, "-1")) {				crm_debug("resource %s is pending on: %s\n",					  rsc, target);							} else if(safe_str_neq(op_code, "0")) {				crm_debug("resource %s is failed on: %s\n",					  rsc, target);							} else {				crm_debug("resource %s is running on: %s\n",					  rsc, target);								printf("resource %s is running on: %s\n",				       rsc, target);				if(BE_SILENT) {					fprintf(stderr, "%s ", target);				}				found++;			}		}		if(BE_SILENT) {			fprintf(stderr, "\n");		}	}	if(found == 0) {		printf("resource %s is NOT running\n", rsc);	}						return found;}