printf("resource %s is running on: %s\n",
printf("resource %s is running on: %s",
do_find_resource(const char *rsc, crm_data_t *xml_node){	int found = 0;	crm_data_t *nodestates = get_object_root(XML_CIB_TAG_STATUS, xml_node);	const char *path2[] = {		XML_CIB_TAG_LRM,		XML_LRM_TAG_RESOURCES	};	xml_child_iter(		nodestates, a_node, XML_CIB_TAG_STATE,		crm_data_t *rscstates = NULL;		if(is_node_online(a_node) == FALSE) {			crm_devel("Skipping offline node: %s",				crm_element_value(a_node, XML_ATTR_ID));			continue;		}				rscstates = find_xml_node_nested(a_node, path2, DIMOF(path2));		xml_child_iter(			rscstates, rsc_state, XML_LRM_TAG_RESOURCE,			const char *id = crm_element_value(rsc_state,XML_ATTR_ID);			const char *target =				crm_element_value(rsc_state,XML_LRM_ATTR_TARGET);			const char *last_op =				crm_element_value(rsc_state,XML_LRM_ATTR_LASTOP);			const char *op_code =				crm_element_value(rsc_state,XML_LRM_ATTR_OPSTATUS);						crm_devel("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_devel("resource %s is stopped on: %s\n",					  rsc, target);							} else if(safe_str_eq(op_code, "-1")) {				crm_devel("resource %s is pending on: %s\n",					  rsc, target);							} else if(safe_str_neq(op_code, "0")) {				crm_devel("resource %s is failed on: %s\n",					  rsc, target);							} else {				crm_devel("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;}