index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-06-07 23:05:21 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-30 16:05:20 -0500 |
commit | 68284da0d72bf27ac3dc5cfc1cd02d16f824130c (patch) | |
tree | 8835a9047bd9ebd95d4ea7f72c2fe7e054d23180 /lib/libalpm/db.c | |
parent | 6633b8e5c290dbb1b0382f3f960e1f7134247a68 (diff) |
-rw-r--r-- | lib/libalpm/db.c | 8 |
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index f6f810c0..b6a436f1 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -219,6 +219,14 @@ const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db) return db->treename; } +/** Check the validity of a database. */ +int SYMEXPORT alpm_db_get_valid(alpm_db_t *db) +{ + ASSERT(db != NULL, return -1); + db->handle->pm_errno = 0; + return db->ops->validate(db); +} + /** Get a package entry from a package database. */ alpm_pkg_t SYMEXPORT *alpm_db_get_pkg(alpm_db_t *db, const char *name) { |