From dfc85cb5f516ffbcff557522e9703c5c7d88b047 Mon Sep 17 00:00:00 2001 From: VMiklos Date: Thu, 31 May 2007 15:18:24 -0400 Subject: Add a alpm_db_test() function to the backend for checking DB consistency Signed-off-by: Dan McGee --- lib/libalpm/db.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/libalpm/db.c') 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 -- cgit v1.2.3-24-g4f1b