X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftdb2.h;h=4f5be81950d069fa9dbe5bb8492f0086ed50f708;hp=0940be1ceac40797435eaaa6241cbdd0e787484f;hb=f6067e4cbd7b7415571f12438aec00faec5657fb;hpb=8d8de08d9079f503256e1682dfa93bb22dcd4ad0 diff --git a/ccan/tdb2/tdb2.h b/ccan/tdb2/tdb2.h index 0940be1c..4f5be819 100644 --- a/ccan/tdb2/tdb2.h +++ b/ccan/tdb2/tdb2.h @@ -430,6 +430,17 @@ enum TDB_ERROR tdb_check_(struct tdb_context *tdb, void *private), void *private); +/** + * tdb_error - get the last error (not threadsafe) + * @tdb: the tdb context returned from tdb_open() + * + * Returns the last error returned by a TDB function. + * + * This makes porting from TDB1 easier, but note that the last error is not + * reliable in threaded programs. + */ +enum TDB_ERROR tdb_error(struct tdb_context *tdb); + /** * enum tdb_summary_flags - flags for tdb_summary. */