X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=osl.c;h=b9424e30c2790947f58923b7b099fbb956029982;hb=afee1a06bfa10366c0acb366a2f3b4c09f912cf3;hp=3e41c530399579c4400d6a4d0d879c9e50576539;hpb=e7fdbaf015655af4eec7e4655b9306e1db862a40;p=osl.git diff --git a/osl.c b/osl.c index 3e41c53..b9424e3 100644 --- a/osl.c +++ b/osl.c @@ -12,7 +12,6 @@ #include "osl.h" #include "error.h" #include "fd.h" -#include "list.h" #include "osl_core.h" /* Taken from Drepper: How to write shared libraries, Appendix B. */ @@ -658,11 +657,12 @@ static int map_column(struct osl_table *t, unsigned col_num) { struct stat statbuf; char *filename = column_filename(t, col_num); - int ret = -E_OSL_STAT; + int ret; if (!filename) return -ERRNO_TO_ERROR(ENOMEM); - if (stat(filename, &statbuf) < 0) { + ret = osl_stat(filename, &statbuf); + if (ret < 0) { free(filename); return ret; } @@ -1186,7 +1186,7 @@ static int truncate_mapped_file(const struct osl_table *t, unsigned col_num, if (!filename) return -ERRNO_TO_ERROR(ENOMEM); - ret = para_truncate(filename, size); + ret = truncate_file(filename, size); free(filename); return ret; } @@ -1312,7 +1312,7 @@ __export int osl_add_and_get_row(struct osl_table *t, struct osl_object *objects if (ret < 0) { /* truncate index and rollback changes */ char *filename = index_filename(t->desc); if (filename) - para_truncate(filename, t->row_index_size); + truncate_file(filename, t->row_index_size); free(filename); goto rollback; }