X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftdb2%2Fprivate.h;h=e2982bc5aac6cb49ac5c0118736f5c7b536e94c7;hb=871277c1dadd546a4e6973c1646d04554e43be62;hp=09f447f9221d179377d3e25bddae3a45977c49b1;hpb=51a56b52627e635566253a3fae081c3f466b6bb6;p=ccan diff --git a/ccan/tdb2/private.h b/ccan/tdb2/private.h index 09f447f9..e2982bc5 100644 --- a/ccan/tdb2/private.h +++ b/ccan/tdb2/private.h @@ -37,7 +37,7 @@ #include #include #include -#ifdef HAVE_BYTESWAP_H +#if HAVE_BYTESWAP_H #include #endif @@ -366,8 +366,8 @@ struct tdb_context { }; struct tdb_methods { - int (*read)(struct tdb_context *, tdb_off_t, void *, tdb_len_t); - int (*write)(struct tdb_context *, tdb_off_t, const void *, tdb_len_t); + 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); void *(*direct)(struct tdb_context *, tdb_off_t, size_t, bool); @@ -474,11 +474,6 @@ tdb_off_t tdb_find_nonzero_off(struct tdb_context *tdb, tdb_off_t tdb_find_zero_off(struct tdb_context *tdb, tdb_off_t off, uint64_t num); -/* Even on files, we can get partial writes due to signals. */ -bool tdb_pwrite_all(int fd, const void *buf, size_t len, tdb_off_t off); -bool tdb_pread_all(int fd, void *buf, size_t len, tdb_off_t off); -bool tdb_read_all(int fd, void *buf, size_t len); - /* Allocate and make a copy of some offset. */ void *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len);