X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=osl.c;h=f49785cd8574add659f44650c71a40644154fa8a;hb=70de5747997ee637dba6f817abccc56ec1340875;hp=1587b04c5fa06201ce5e32c024c7a8e189a24b8b;hpb=efa1d1c721efca286ed95567a365ea4a324c437f;p=paraslash.git diff --git a/osl.c b/osl.c index 1587b04c..f49785cd 100644 --- a/osl.c +++ b/osl.c @@ -340,15 +340,15 @@ int para_mkdir(const char *path, mode_t mode) static int verify_basename(const char *name) { if (!name) - return -E_BAD_BASENAME; + return -E_BAD_NAME; if (!*name) - return -E_BAD_BASENAME; + return -E_BAD_NAME; if (strchr(name, '/')) - return -E_BAD_BASENAME; + return -E_BAD_NAME; if (!strcmp(name, "..")) - return -E_BAD_BASENAME; + return -E_BAD_NAME; if (!strcmp(name, ".")) - return -E_BAD_BASENAME; + return -E_BAD_NAME; return 1; } @@ -730,7 +730,7 @@ static int create_table_index(struct osl_table *t) * \param desc Pointer to the table description. * * \return Positive on success, negative on errors. Possible errors include: \p - * E_BAD_TABLE_DESC, \p E_BAD_DB_DIR, \p E_BAD_BASENAME, \p E_NO_COMPARE_FUNC, \p + * E_BAD_TABLE_DESC, \p E_BAD_DB_DIR, \p E_BAD_NAME, \p E_NO_COMPARE_FUNC, \p * E_NO_COLUMN_NAME, \p E_DUPLICATE_COL_NAME, \p E_MKDIR, any errors returned * by para_open(). */ @@ -945,7 +945,7 @@ err: /* unmap what is already mapped */ * of storage type \p OSL_MAPPED_STORAGE. * * \return Positive on success, negative on errors. Possible errors include: - * \p E_BAD_ID, \p E_INVALID_OBJECT. + * \p E_BAD_ROW_NUM, \p E_INVALID_OBJECT. * * \sa osl_storage_type. */ @@ -959,7 +959,7 @@ int get_mapped_object(const struct osl_table *t, unsigned col_num, int ret; if (t->num_rows <= row_num) - return -E_BAD_ID; + return -E_BAD_ROW_NUM; ret = get_cell_index(t, row_num, col_num, &cell_index); if (ret < 0) return ret; @@ -1930,7 +1930,7 @@ int osl_update_object(struct osl_table *t, const struct osl_row *r, } if (cd->storage_flags & OSL_FIXED_SIZE) { if (obj->size != cd->data_size) - return -E_BAD_SIZE; + return -E_BAD_DATA_SIZE; } remove_rb_node(t, col_num, r); if (cd->storage_type == OSL_NO_STORAGE) { /* TODO: If fixed size, reuse object? */