]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/tdb2.h
tdb2: tdb_error()
[ccan] / ccan / tdb2 / tdb2.h
index 0940be1ceac40797435eaaa6241cbdd0e787484f..4f5be81950d069fa9dbe5bb8492f0086ed50f708 100644 (file)
@@ -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.
  */