crm_verbose("Processing resource...");  (*rsc)->priority	   = atoi(priority?priority:"0"); (*rsc)->effective_priority = (*rsc)->priority; (*rsc)->recovery_type      = recovery_stop_start; (*rsc)->runnable	   = TRUE; (*rsc)->provisional	   = TRUE; (*rsc)->timeout		   = timeout; (*rsc)->candidate_colors   = NULL; (*rsc)->rsc_cons	   = NULL; (*rsc)->actions            = NULL;  if(safe_str_eq(stopfail, "ignore")) { (*rsc)->stopfail_type = pesf_ignore; } else if(safe_str_eq(stopfail, "stonith")) { (*rsc)->stopfail_type = pesf_stonith; } else { (*rsc)->stopfail_type = pesf_block; }  if(safe_str_eq(restart, "restart")) { (*rsc)->restart_type = pe_restart_restart; } else if(safe_str_eq(restart, "recover")) { (*rsc)->restart_type = pe_restart_recover; } else { (*rsc)->restart_type = pe_restart_ignore; }
common_unpack(xmlNodePtr xml_obj, resource_t **rsc){	const char *id = xmlGetProp(xml_obj, XML_ATTR_ID);		crm_verbose("Processing resource...");		if(id == NULL) {		crm_err("Must specify id tag in <resource>");		return FALSE;			} else if(rsc == NULL) {		crm_err("Nowhere to unpack resource into");		return FALSE;			}	crm_malloc(*rsc, sizeof(resource_t));		if(*rsc == NULL) {		return FALSE;	}		(*rsc)->id  = id;	(*rsc)->xml = xml_obj;	(*rsc)->variant = get_resource_type(xml_obj->name);		if((*rsc)->variant == pe_unknown) {		crm_err("Unknown resource type: %s", xml_obj->name);		crm_free(*rsc);		return FALSE;	}		(*rsc)->fns = &resource_class_functions[(*rsc)->variant];	(*rsc)->fns->unpack(*rsc);	return TRUE;}