From e2aa952689da8763d534d1c19310eb97009f4f76 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 7 Jun 2011 16:06:16 -0500 Subject: Move pm_errno onto the handle This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee --- src/util/testpkg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/util/testpkg.c') 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; -- cgit v1.2.3-70-g09d2