Get rid of E_OSL_STAT.
[osl.git] / osl_core.h
index b6d1f8222878de726dfadeced976fc1f9c99799f..8a575c685e9e698995d5f8b8c41cb704620812cb 100644 (file)
@@ -7,10 +7,9 @@
 /** \file osl_core.h Object storage layer details, not visible to users. */
 
 #include "rbtree.h"
 /** \file osl_core.h Object storage layer details, not visible to users. */
 
 #include "rbtree.h"
-#include "osl.h"
 #include "hash.h"
 
 #include "hash.h"
 
-static __must_check __printf_1_2 __malloc char *make_message(const char *fmt, ...);
+__must_check __printf_1_2 __malloc char *make_message(const char *fmt, ...);
 
 /** Internal representation of a column of an osl table. */
 struct osl_column {
 
 /** Internal representation of a column of an osl table. */
 struct osl_column {
@@ -84,7 +83,6 @@ int init_table_structure(const struct osl_table_description *desc,
 int row_is_invalid(struct osl_table *t, uint32_t row_num);
 int get_mapped_object(const struct osl_table *t, unsigned col_num,
        uint32_t row_num, struct osl_object *obj);
 int row_is_invalid(struct osl_table *t, uint32_t row_num);
 int get_mapped_object(const struct osl_table *t, unsigned col_num,
        uint32_t row_num, struct osl_object *obj);
-int para_truncate(const char *filename, off_t size);
 int unmap_table(struct osl_table *t, enum osl_close_flags flags);
 int init_rbtrees(struct osl_table *t);
 
 int unmap_table(struct osl_table *t, enum osl_close_flags flags);
 int init_rbtrees(struct osl_table *t);
 
@@ -261,7 +259,7 @@ _static_inline_ int get_row_index(const struct osl_table *t, uint32_t row_num,
        index_offset = t->index_header_size + t->row_index_size * row_num;
        if (index_offset + 8 > t->index_map.size) {
                *row_index = NULL;
        index_offset = t->index_header_size + t->row_index_size * row_num;
        if (index_offset + 8 > t->index_map.size) {
                *row_index = NULL;
-               return -E_INDEX_CORRUPTION;
+               return -E_OSL_INDEX_CORRUPTION;
        }
        *row_index = (char *)(t->index_map.data) + index_offset;
        return 1;
        }
        *row_index = (char *)(t->index_map.data) + index_offset;
        return 1;
@@ -474,23 +472,6 @@ _static_inline_ char *disk_storage_name_of_hash(const struct osl_table *t, HASH_
        return strdup(asc);
 }
 
        return strdup(asc);
 }
 
-/**
- * A wrapper for rename(2).
- *
- * \param old_path The source path.
- * \param new_path The destination path.
- *
- * \return Standard.
- *
- * \sa rename(2).
- */
-_static_inline_ int para_rename(const char *old_path, const char *new_path)
-{
-       if (rename(old_path, new_path) < 0)
-               return -ERRNO_TO_ERROR(errno);
-       return 1;
-}
-
 /**
  * Iterate over each column of an initialized table.
  *
 /**
  * Iterate over each column of an initialized table.
  *