printf("%s: %s (%s::%s)\n", name, ID(rsc), crm_str(class), crm_str(type)); } else if(safe_str_eq(name, XML_CIB_TAG_GROUP) || safe_str_eq(name, XML_CIB_TAG_INCARNATION)) { for(lpc = 0; lpc < level; lpc++) { printf("\t"); } printf("%s: %s (complex)\n", name, ID(rsc)); do_find_resource_list(level+1, rsc); found++; }
do_find_resource_list(int level, crm_data_t *resource_list){	int lpc = 0;	int found = 0;	const char *name = NULL;	const char *type = NULL;	const char *class = NULL;		xml_child_iter(		resource_list, rsc, NULL,		name = crm_element_name(rsc);		if(safe_str_eq(name, XML_CIB_TAG_RESOURCE)) {			class = crm_element_value(rsc, "class");			type = crm_element_value(rsc, XML_ATTR_TYPE);			for(lpc = 0; lpc < level; lpc++) {				printf("\t");			}			found++;			printf("%s: %s (%s::%s)\n",			       name, ID(rsc), crm_str(class), crm_str(type));		} else if(safe_str_eq(name, XML_CIB_TAG_GROUP)			  || safe_str_eq(name, XML_CIB_TAG_INCARNATION)) {			for(lpc = 0; lpc < level; lpc++) {				printf("\t");			}			printf("%s: %s (complex)\n", name, ID(rsc));			do_find_resource_list(level+1, rsc);			found++;		}		);	if(found == 0) {		for(lpc = 0; lpc < level; lpc++) {			printf("\t");		}		printf("NO resources configured\n");	}						return found;}