summaryrefslogtreecommitdiff
path: root/lib/tdb2/test/layout.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-12-05 17:04:30 +1030
committerRusty Russell <rusty@rustcorp.com.au>2011-12-05 17:04:30 +1030
commit3f99fc16a0a3aead82cf8cdfb9703f8f18388623 (patch)
tree01eecd8d641c7de4bd76506592379a7070e1feff /lib/tdb2/test/layout.h
parenteff985b7ef3f1adb3da383baaea013f7f3797bb2 (diff)
downloadsamba-3f99fc16a0a3aead82cf8cdfb9703f8f18388623.tar.gz
samba-3f99fc16a0a3aead82cf8cdfb9703f8f18388623.tar.bz2
samba-3f99fc16a0a3aead82cf8cdfb9703f8f18388623.zip
tdb2: provide tdb_layout_write() rather than implying it by new_tdb_layout arg.
Neater API. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (Imported from CCAN commit 79d603a5f73dfbb655d8d08f67eecb5f2da542d5)
Diffstat (limited to 'lib/tdb2/test/layout.h')
-rw-r--r--lib/tdb2/test/layout.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/tdb2/test/layout.h b/lib/tdb2/test/layout.h
index 96ecb683b8..6649113766 100644
--- a/lib/tdb2/test/layout.h
+++ b/lib/tdb2/test/layout.h
@@ -2,7 +2,7 @@
#define TDB2_TEST_LAYOUT_H
#include <ccan/tdb2/private.h>
-struct tdb_layout *new_tdb_layout(const char *filename);
+struct tdb_layout *new_tdb_layout(void);
void tdb_layout_add_freetable(struct tdb_layout *layout);
void tdb_layout_add_free(struct tdb_layout *layout, tdb_len_t len,
unsigned ftable);
@@ -17,6 +17,9 @@ void tdb_layout_add_hashtable(struct tdb_layout *layout,
#endif
struct tdb_context *tdb_layout_get(struct tdb_layout *layout,
union tdb_attribute *attr);
+void tdb_layout_write(struct tdb_layout *layout, union tdb_attribute *attr,
+ const char *filename);
+
void tdb_layout_free(struct tdb_layout *layout);
enum layout_type {
@@ -62,7 +65,6 @@ union tdb_layout_elem {
};
struct tdb_layout {
- const char *filename;
unsigned int num_elems;
union tdb_layout_elem *elem;
};