summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
authorVMiklos <vmiklos@frugalware.org>2007-05-31 15:18:24 -0400
committerDan McGee <dan@archlinux.org>2007-06-09 12:58:12 -0400
commitdfc85cb5f516ffbcff557522e9703c5c7d88b047 (patch)
tree69b491d7ae8f8b70804833b893ed6f722276fb4b /lib/libalpm/db.c
parent25c5b39d05cdb8856098429d0fa6f8da595d5af6 (diff)
downloadpacman-dfc85cb5f516ffbcff557522e9703c5c7d88b047.tar.xz
Add a alpm_db_test() function to the backend for checking DB consistency
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 7536e678..9d75c5c0 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -368,6 +368,19 @@ alpm_list_t SYMEXPORT *alpm_db_getgrpcache(pmdb_t *db)
return(_alpm_db_get_grpcache(db));
}
+/** Tests a database
+ * @param db pointer to the package database to search in
+ * @return the list of problems found on success, NULL on error
+ */
+alpm_list_t SYMEXPORT *alpm_db_test(pmdb_t *db)
+{
+ /* Sanity checks */
+ ASSERT(handle != NULL, return(NULL));
+ ASSERT(db != NULL, return(NULL));
+
+ return(_alpm_db_test(db));
+}
+
/** Searches a database
* @param db pointer to the package database to search in
* @param needles the list of strings to search for