__export int osl_open_table(const struct osl_table_description *table_desc,
struct osl_table **result)
{
- int i, ret;
+ int ret;
struct osl_table *t;
- const struct osl_column_description *cd;
NOTICE_LOG("opening table %s\n", table_desc->name);
ret = init_table_structure(table_desc, &t);
if (ret < 0)
return ret;
- FOR_EACH_DISK_STORAGE_COLUMN(i, t, cd) {
- struct stat statbuf;
- char *dirname = column_filename(t, i);
-
- ret = -E_OSL_NOMEM;
- if (!dirname)
- goto err;
- /* check if directory exists */
- ret = osl_stat(dirname, &statbuf);
- free(dirname);
- if (ret < 0)
- goto err;
- ret = -E_OSL_NOTDIR;
- if (!S_ISDIR(statbuf.st_mode))
- goto err;
- }
ret = map_table(t, MAP_TBL_FL_VERIFY_INDEX);
if (ret < 0)
goto err;