+static int map_column(struct osl_table *t, unsigned col_num)
+{
+ struct stat statbuf;
+ char *filename = column_filename(t, col_num);
+ int ret = -E_STAT;
+ if (stat(filename, &statbuf) < 0) {
+ free(filename);
+ return ret;
+ }
+ if (!(S_IFREG & statbuf.st_mode)) {
+ free(filename);
+ return ret;
+ }
+ ret = mmap_full_file(filename, O_RDWR,
+ &t->columns[col_num].data_map);
+ free(filename);
+ return ret;
+}
+