unpack_instance_attributes(attr_sets, (*rsc)->parameters);
unpack_instance_attributes(xml_obj, (*rsc)->parameters);
common_unpack(crm_data_t * xml_obj, resource_t **rsc){	const char *id            = crm_element_value(xml_obj, XML_ATTR_ID);	const char *stopfail      = crm_element_value(xml_obj, XML_RSC_ATTR_STOPFAIL);	const char *restart       = crm_element_value(xml_obj, XML_RSC_ATTR_RESTART);	const char *def_timeout   = crm_element_value(xml_obj, XML_ATTR_TIMEOUT);	const char *start_timeout = crm_element_value(xml_obj, XML_RSC_ATTR_START_TIMEOUT);	const char *stop_timeout  = crm_element_value(xml_obj, XML_RSC_ATTR_STOP_TIMEOUT);	const char *priority      = NULL;	crm_data_t *attr_sets = find_xml_node(xml_obj, XML_TAG_ATTR_SETS,FALSE);	crm_xml_verbose(xml_obj, "Processing resource input...");		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(crm_element_name(xml_obj));		if((*rsc)->variant == pe_unknown) {		crm_err("Unknown resource type: %s", crm_element_name(xml_obj));		crm_free(*rsc);		return FALSE;	}		(*rsc)->fns = &resource_class_functions[(*rsc)->variant];	crm_verbose("Unpacking resource...");		(*rsc)->parameters = g_hash_table_new_full(		g_str_hash,g_str_equal, g_hash_destroy_str,g_hash_destroy_str);	unpack_instance_attributes(attr_sets, (*rsc)->parameters);	priority = get_rsc_param(*rsc, XML_CIB_ATTR_PRIORITY);	(*rsc)->priority	   = atoi(priority?priority:"0"); 	(*rsc)->effective_priority = (*rsc)->priority;	(*rsc)->recovery_type      = recovery_stop_start;	(*rsc)->runnable	   = TRUE; 	(*rsc)->provisional	   = TRUE; 	(*rsc)->starting	   = FALSE; 	(*rsc)->stopping	   = FALSE; 	(*rsc)->start_timeout	   = start_timeout;	(*rsc)->stop_timeout	   = stop_timeout;	(*rsc)->def_timeout	   = def_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, XML_CIB_ATTR_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;	}	(*rsc)->fns->unpack(*rsc);	return TRUE;}