summaryrefslogtreecommitdiff
path: root/src/util/testpkg.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-07 16:06:16 -0500
committerDan McGee <dan@archlinux.org>2011-06-13 19:38:38 -0500
commite2aa952689da8763d534d1c19310eb97009f4f76 (patch)
tree7d022d67801bc01c24fef985feb9a617c48d316a /src/util/testpkg.c
parent8b62d9bc0ade64897990b8fc6a1b6a54b629cb5b (diff)
downloadpacman-e2aa952689da8763d534d1c19310eb97009f4f76.tar.xz
Move pm_errno onto the handle
This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util/testpkg.c')
-rw-r--r--src/util/testpkg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index 5b8831de..c6f02e34 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -60,7 +60,8 @@ int main(int argc, char *argv[])
if(alpm_pkg_load(handle, argv[1], 1, PM_PGP_VERIFY_OPTIONAL, &pkg) == -1
|| pkg == NULL) {
- switch(pm_errno) {
+ enum _pmerrno_t err = alpm_errno(handle);
+ switch(err) {
case PM_ERR_PKG_OPEN:
printf("Cannot open the given file.\n");
break;
@@ -69,7 +70,7 @@ int main(int argc, char *argv[])
printf("Package is invalid.\n");
break;
default:
- printf("libalpm error: %s\n", alpm_strerrorlast());
+ printf("libalpm error: %s\n", alpm_strerror(err));
break;
}
retval = 1;