index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2011-06-07 16:06:16 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-13 19:38:38 -0500 |
commit | e2aa952689da8763d534d1c19310eb97009f4f76 (patch) | |
tree | 7d022d67801bc01c24fef985feb9a617c48d316a /lib/libalpm/error.c | |
parent | 8b62d9bc0ade64897990b8fc6a1b6a54b629cb5b (diff) |
-rw-r--r-- | lib/libalpm/error.c | 16 |
diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index 294ec214..d893f866 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -29,15 +29,12 @@ #include "alpm.h" #include "handle.h" -/* global handle variable */ -extern pmhandle_t *handle; - -const char SYMEXPORT *alpm_strerrorlast(void) +enum _pmerrno_t SYMEXPORT alpm_errno(pmhandle_t *handle) { - return alpm_strerror(pm_errno); + return handle->pm_errno; } -const char SYMEXPORT *alpm_strerror(int err) +const char SYMEXPORT *alpm_strerror(enum _pmerrno_t err) { switch(err) { /* System */ @@ -140,8 +137,6 @@ const char SYMEXPORT *alpm_strerror(int err) /* Miscellaenous */ case PM_ERR_RETRIEVE: return _("failed to retrieve some files"); - case PM_ERR_WRITE: - return _("failed to copy some file"); case PM_ERR_INVALID_REGEX: return _("invalid regular expression"); /* Errors from external libraries- our own wrapper error */ @@ -151,12 +146,7 @@ const char SYMEXPORT *alpm_strerror(int err) * error string instead. */ return _("libarchive error"); case PM_ERR_LIBCURL: -#ifdef HAVE_LIBCURL - return curl_easy_strerror(handle->curlerr); -#else - /* obviously shouldn't get here... */ return _("download library error"); -#endif case PM_ERR_GPGME: return _("gpgme error"); case PM_ERR_EXTERNAL_DOWNLOAD: |