do_work(const char *admin_input_xml, int call_options, crm_data_t **output)
do_work(crm_data_t *input, int call_options, crm_data_t **output)
do_work(const char *admin_input_xml, int call_options, crm_data_t **output) {	/* construct the request */	crm_data_t *msg_data = NULL;	if(strcmp(CIB_OP_QUERY, cib_action) == 0) {		crm_debug_2("Querying the CIB for section: %s",			    obj_type);		return the_cib->cmds->query_from(			the_cib, host, obj_type, output, call_options);			} else if (strcmp(CIB_OP_ERASE, cib_action) == 0) {		crm_debug_4("CIB Erase op in progress");		return the_cib->cmds->erase(the_cib, output, call_options);			} else if (strcmp(CIB_OP_CREATE, cib_action) == 0) {		enum cib_errors rc = cib_ok;		crm_debug_4("Performing %s op...", cib_action);		msg_data = handleCibMod(admin_input_xml);		rc = the_cib->cmds->create(			the_cib, obj_type, msg_data, output, call_options);		free_xml(msg_data);		return rc;	} else if (strcmp(CIB_OP_UPDATE, cib_action) == 0) {		enum cib_errors rc = cib_ok;		crm_debug_4("Performing %s op...", cib_action);		msg_data = handleCibMod(admin_input_xml);		rc = the_cib->cmds->update(			the_cib, obj_type, msg_data, output, call_options);		free_xml(msg_data);		return rc;	} else if (strcmp(CIB_OP_MODIFY, cib_action) == 0) {		enum cib_errors rc = cib_ok;		crm_debug_4("Performing %s op...", cib_action);		if(admin_input_xml == NULL) {			msg_data = stdin2xml();		} else {			msg_data = string2xml(admin_input_xml);		}		rc = the_cib->cmds->modify(			the_cib, obj_type, msg_data, output, call_options);		free_xml(msg_data);		return rc;	} else if (strcmp(CIB_OP_DELETE_ALT, cib_action) == 0) {		enum cib_errors rc = cib_ok;		crm_debug_4("Performing %s op...", cib_action);		msg_data = handleCibMod(admin_input_xml);		rc = the_cib->cmds->delete_absolute(			the_cib, obj_type, msg_data, output, call_options);		free_xml(msg_data);		return rc;	} else if (strcmp(CIB_OP_DELETE, cib_action) == 0) {		enum cib_errors rc = cib_ok;		crm_debug_4("Performing %s op...", cib_action);		if(admin_input_xml == NULL) {			msg_data = stdin2xml();		} else {			msg_data = string2xml(admin_input_xml);		}		rc = the_cib->cmds->delete(			the_cib, obj_type, msg_data, output, call_options);		free_xml(msg_data);		return rc;	} else if (strcmp(CIB_OP_SYNC, cib_action) == 0) {		crm_debug_4("Performing %s op...", cib_action);		return the_cib->cmds->sync_from(			the_cib, host, obj_type, call_options);	} else if (strcmp(CIB_OP_SLAVE, cib_action) == 0		   && (call_options ^ cib_scope_local) ) {		crm_debug_4("Performing %s op on all nodes...", cib_action);		return the_cib->cmds->set_slave_all(the_cib, call_options);	} else if (strcmp(CIB_OP_MASTER, cib_action) == 0) {		crm_debug_4("Performing %s op on all nodes...", cib_action);		return the_cib->cmds->set_master(the_cib, call_options);	} else if(cib_action != NULL) {		crm_debug_4("Passing \"%s\" to variant_op...", cib_action);		return the_cib->cmds->variant_op(			the_cib, cib_action, host, obj_type,			NULL, output, call_options);			} else {		crm_err("You must specify an operation");	}	return cib_operation;}