]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/private.h
tdb2: rework io functions to return enum TDB_ERROR.
[ccan] / ccan / tdb2 / private.h
index 4ecda6a5f529729518b051a53db711f582fde6db..f0b5cae562db93b5b9bb8cc05607f36ad36556dc 100644 (file)
@@ -379,10 +379,12 @@ struct tdb_context {
 };
 
 struct tdb_methods {
-       int (*tread)(struct tdb_context *, tdb_off_t, void *, tdb_len_t);
-       int (*twrite)(struct tdb_context *, tdb_off_t, const void *, tdb_len_t);
-       int (*oob)(struct tdb_context *, tdb_off_t, bool);
-       int (*expand_file)(struct tdb_context *, tdb_len_t);
+       enum TDB_ERROR (*tread)(struct tdb_context *, tdb_off_t, void *,
+                               tdb_len_t);
+       enum TDB_ERROR (*twrite)(struct tdb_context *, tdb_off_t, const void *,
+                                tdb_len_t);
+       enum TDB_ERROR (*oob)(struct tdb_context *, tdb_off_t, bool);
+       enum TDB_ERROR (*expand_file)(struct tdb_context *, tdb_len_t);
        void *(*direct)(struct tdb_context *, tdb_off_t, size_t, bool);
 };