g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RA_VERSION_MAJOR"), g_strdup("1")); g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RA_VERSION_MINOR"), g_strdup("0"));   g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_ROOT"), g_strdup(OCF_ROOT_DIR));   g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RESOURCE_TYPE"), g_strdup(rsc_type));   g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RESOURCE_PROVIDER"), g_strdup(provider));   #if 0 g_hash_table_insert(tmp_for_setenv, "OCF_RESOURCE_INSTANCE", "FIXME"); #endif
add_OCF_env_vars(tmp_for_setenv, rsc_id, rsc_type, provider);
execra(const char * rsc_type, const char * provider, const char * op_type,	GHashTable * params){	uniform_ret_execra_t exit_value;	char ra_pathname[RA_MAX_NAME_LENGTH];	GHashTable * tmp_for_setenv;	get_ra_pathname(RA_PATH, rsc_type, provider, ra_pathname);	/* Setup environment correctly */	tmp_for_setenv = g_hash_table_new(g_str_hash, g_str_equal);	add_OCF_prefix(params, tmp_for_setenv);	g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RA_VERSION_MAJOR"), 			    g_strdup("1"));	g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RA_VERSION_MINOR"), 			    g_strdup("0"));	/* According to OCF specification, OCF_ROOT refer to the root of 	 * the OCF directory hierarchy. Now as for current directory	 * layout, OCF_ROOT==OCF_RA_DIR?  I'm not very sure, pls fix me.	 */	g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_ROOT"), 			    g_strdup(OCF_ROOT_DIR));	/* Currently the rsc_type==rsc_class_name, maybe not correct.	 * Please fix me if you are sure what it should be. 	 */	g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RESOURCE_TYPE"), 			    g_strdup(rsc_type));	/* Notes: this is not added to specification yet. Sept 10,2004 */	g_hash_table_insert(tmp_for_setenv, g_strdup("OCF_RESOURCE_PROVIDER"),			    g_strdup(provider));	/* TODO: This is not passed in currently. */#if 0	g_hash_table_insert(tmp_for_setenv, "OCF_RESOURCE_INSTANCE", 			"FIXME");#endif	raexec_setenv(tmp_for_setenv);	g_hash_table_foreach_remove(tmp_for_setenv, let_remove_eachitem, NULL);	g_hash_table_destroy(tmp_for_setenv);		/* execute the RA */	cl_log(LOG_DEBUG, "Will execute OCF RA : %s %s", ra_pathname, op_type);	execl(ra_pathname, ra_pathname, op_type, NULL);	switch (errno) {		case ENOENT:   /* No such file or directory */		case EISDIR:   /* Is a directory */			exit_value = EXECRA_NO_RA;			break;		default:			exit_value = EXECRA_EXEC_UNKNOWN_ERROR;	}	cl_log(LOG_ERR, "execl error when to execute RA %s.", rsc_type);	exit(exit_value);}