X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb.c;h=79ccd0f1c260cb476b35c146f15a9438f843a673;hp=d3d12250cea8b21f4bf76431957f660796d83dad;hb=6fdff621a98f161701f79b3da64e461feaa21952;hpb=a97da100b00206544c7a68593b64a49f2b854f7e diff --git a/ccan/tdb2/tdb.c b/ccan/tdb2/tdb.c index d3d12250..79ccd0f1 100644 --- a/ccan/tdb2/tdb.c +++ b/ccan/tdb2/tdb.c @@ -2,9 +2,6 @@ #include #include -/* The null return. */ -struct tdb_data tdb_null = { .dptr = NULL, .dsize = 0 }; - static enum TDB_ERROR update_rec_hdr(struct tdb_context *tdb, tdb_off_t off, tdb_len_t keylen, @@ -431,3 +428,12 @@ enum TDB_ERROR tdb_parse_record_(struct tdb_context *tdb, return ecode; } +const char *tdb_name(const struct tdb_context *tdb) +{ + return tdb->name; +} + +int tdb_fd(const struct tdb_context *tdb) +{ + return tdb->file->fd; +}