cl_log(LOG_DEBUG, "To execute a RA %s.", rsc_type);
execra( const char * rsc_type, const char * op_type,	GHashTable * cmd_params, GHashTable * env_params ){	uniform_ret_execra_t exit_value;	RA_ARGV params_argv;	char *ra_name_dup, *base_name;	GString * ra_dirname;	GString * debug_info;	int index_tmp = 0;	cl_log(LOG_DEBUG, "To execute a RA %s.", rsc_type);	/* Prepare the call parameter */	if (0 > prepare_cmd_parameters(rsc_type, op_type, cmd_params, params_argv)) {		cl_log(LOG_ERR, "lsb RA: Error of preparing parameters");		return -1;	}	ra_dirname = g_string_new(rsc_type);	ra_name_dup = strndup(rsc_type, RA_MAX_DIRNAME_LENGTH);	base_name = basename(ra_name_dup);	/*	 * If rsc_type only contains basename, then append RA_PATH.	 * If rsc_type is a pathname, then don't deal with it.	 */	if ( strncmp(rsc_type, base_name, RA_MAX_BASENAME_LENGTH) == 0 ) {		g_string_insert(ra_dirname, 0, RA_PATH);	}	free(ra_name_dup);	raexec_setenv(env_params);	debug_info = g_string_new("");	do {		g_string_append(debug_info, params_argv[index_tmp]);		g_string_append(debug_info, " ");	} while (params_argv[++index_tmp] != NULL);	debug_info->str[debug_info->len-1] = '\0';	cl_log(LOG_INFO, "Will execute a lsb RA: %s", debug_info->str);	g_string_free(debug_info, TRUE);	execv(ra_dirname->str, params_argv);        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;        }	g_string_free(ra_dirname, TRUE);        cl_log(LOG_ERR, "execl error when to execute RA %s.", rsc_type);        exit(exit_value);}