summaryrefslogtreecommitdiffstats
path: root/src/util/testdb.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-07 20:15:43 +0200
committerDan McGee <dan@archlinux.org>2011-06-09 21:24:45 +0200
commit17a6ac567502975d3a98a34ed58d79c05eb7b8d1 (patch)
treefb764ae26aac86fd43daa79cb0047cc82f8039e9 /src/util/testdb.c
parent7968d30510de5a6031af39da498be5c821290b82 (diff)
downloadpacman-17a6ac567502975d3a98a34ed58d79c05eb7b8d1.tar.gz
pacman-17a6ac567502975d3a98a34ed58d79c05eb7b8d1.tar.xz
Require handle argument to all alpm_option_(get|set)_*() methods
This requires a lot of line changes, but not many functional changes as more often than not our handle variable is already available in some fashion. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util/testdb.c')
-rw-r--r--src/util/testdb.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 06c01f8d..c7640d91 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -61,7 +61,7 @@ static int check_localdb_files(void)
int ret = 0;
DIR *dir;
- dbpath = alpm_option_get_dbpath();
+ dbpath = alpm_option_get_dbpath(handle);
snprintf(path, sizeof(path), "%slocal", dbpath);
if(!(dir = opendir(path))) {
fprintf(stderr, "error : %s : %s\n", path, strerror(errno));
@@ -138,12 +138,7 @@ static int check_localdb(void) {
return ret;
}
- db = alpm_option_get_localdb();
- if(db == NULL) {
- fprintf(stderr, "error: could not register 'local' database (%s)\n",
- alpm_strerrorlast());
- cleanup(EXIT_FAILURE);
- }
+ db = alpm_option_get_localdb(handle);
pkglist = alpm_db_get_pkgcache(db);
ret += checkdeps(pkglist);
ret += checkconflicts(pkglist);
@@ -214,7 +209,7 @@ int main(int argc, char *argv[])
}
/* let us get log messages from libalpm */
- alpm_option_set_logcb(output_cb);
+ alpm_option_set_logcb(handle, output_cb);
if(!dbnames) {
ret = check_localdb();