return 0;
return g_list_length(*rsc_info);
get_resource_list(GList ** rsc_info){	struct dirent **namelist;	int file_num;	if ( rsc_info == NULL ) {		cl_log(LOG_ERR, "Parameter error: get_resource_list");		return -2;	}	if ( *rsc_info != NULL ) {		cl_log(LOG_ERR, "Parameter error: get_resource_list."\			"will cause memory leak.");		*rsc_info = NULL;	} 	file_num = scandir(RA_PATH, &namelist, 0, alphasort);	if (file_num < 0) {		cl_log(LOG_ERR, "scandir failed in OCF RA plugin");		return -2;	} else 	{		while (file_num--) {			rsc_info_t * rsc_info_tmp;			if (*(namelist[file_num]->d_name) != '.') {				rsc_info_tmp = g_new(rsc_info_t, 1);					rsc_info_tmp->rsc_type = 					g_strdup(namelist[file_num]->d_name);			/* 			 * Since the version definition isn't cleat yet,			 * the version is setted 1.0.			 */				rsc_info_tmp->version = g_strdup("1.0");			}			free(namelist[file_num]);		}		free(namelist);	}	return 0;			}