From 06fa6acd87ac23ee3ca422dbc56cf97a3c71aa09 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 11 Jun 2009 22:49:03 +0200 Subject: [PATCH] Get rid of all remaining users of ERRNO_TO_ERROR() in osl.c. --- errlist | 3 +++ osl.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/errlist b/errlist index dfd9f6f..e4435df 100644 --- a/errlist +++ b/errlist @@ -33,3 +33,6 @@ EMPTY "file empty" MMAP "mmap error" LOOP "loop terminated" NOMEM "cannot allocate memory" +NOTDIR "not a directory" +STAT "stat error" +UNLINK "failed to unlink file" diff --git a/osl.c b/osl.c index 295c88e..3f55ed4 100644 --- a/osl.c +++ b/osl.c @@ -1073,10 +1073,10 @@ __export int osl_open_table(const struct osl_table_description *table_desc, ret = stat(dirname, &statbuf); free(dirname); if (ret < 0) { - ret = -ERRNO_TO_ERROR(errno); + ret = -E_OSL_STAT; goto err; } - ret = -ERRNO_TO_ERROR(ENOTDIR); + ret = -E_OSL_NOTDIR; if (!S_ISDIR(statbuf.st_mode)) goto err; } @@ -1186,7 +1186,7 @@ static int delete_disk_storage_file(const struct osl_table *t, unsigned col_num, err = errno; free(filename); if (ret < 0) - return -ERRNO_TO_ERROR(err); + return -E_OSL_UNLINK; if (!(t->desc->flags & OSL_LARGE_TABLE)) return 1; dirname = disk_storage_dirname(t, col_num, ds_name); -- 2.39.2