index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/libalpm/alpm.c | 4 | ||||
-rw-r--r-- | lib/libalpm/alpm.h | 8 | ||||
-rw-r--r-- | lib/libalpm/error.c | 4 | ||||
-rw-r--r-- | lib/libalpm/handle.c | 2 | ||||
-rw-r--r-- | lib/libalpm/handle.h | 4 | ||||
-rw-r--r-- | src/pacman/conf.c | 2 | ||||
-rw-r--r-- | src/pacman/remove.c | 2 | ||||
-rw-r--r-- | src/pacman/sync.c | 6 | ||||
-rw-r--r-- | src/pacman/upgrade.c | 4 | ||||
-rw-r--r-- | src/pacman/util.c | 2 | ||||
-rw-r--r-- | src/util/cleanupdelta.c | 2 | ||||
-rw-r--r-- | src/util/pactree.c | 2 | ||||
-rw-r--r-- | src/util/testdb.c | 2 | ||||
-rw-r--r-- | src/util/testpkg.c | 2 |
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 4cafa6a3..abbc7db8 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -47,9 +47,9 @@ * @return a context handle on success, NULL on error, err will be set if provided */ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, - enum _pmerrno_t *err) + enum _alpm_errno_t *err) { - enum _pmerrno_t myerr; + enum _alpm_errno_t myerr; const char *lf = "db.lck"; size_t lockfilelen; alpm_handle_t *myhandle = _alpm_handle_new(); diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index cf040807..54a9ba42 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -983,7 +983,7 @@ char *alpm_compute_md5sum(const char *name); /** @addtogroup alpm_api_errors Error Codes * @{ */ -enum _pmerrno_t { +enum _alpm_errno_t { PM_ERR_MEMORY = 1, PM_ERR_SYSTEM, PM_ERR_BADPERMS, @@ -1048,16 +1048,16 @@ enum _pmerrno_t { }; /** Returns the current error code from the handle. */ -enum _pmerrno_t alpm_errno(alpm_handle_t *handle); +enum _alpm_errno_t alpm_errno(alpm_handle_t *handle); /** Returns the string corresponding to an error number. */ -const char *alpm_strerror(enum _pmerrno_t err); +const char *alpm_strerror(enum _alpm_errno_t err); /* End of alpm_api_errors */ /** @} */ alpm_handle_t *alpm_initialize(const char *root, const char *dbpath, - enum _pmerrno_t *err); + enum _alpm_errno_t *err); int alpm_release(alpm_handle_t *handle); const char *alpm_version(void); diff --git a/lib/libalpm/error.c b/lib/libalpm/error.c index fb0493ff..225d8859 100644 --- a/lib/libalpm/error.c +++ b/lib/libalpm/error.c @@ -29,12 +29,12 @@ #include "alpm.h" #include "handle.h" -enum _pmerrno_t SYMEXPORT alpm_errno(alpm_handle_t *handle) +enum _alpm_errno_t SYMEXPORT alpm_errno(alpm_handle_t *handle) { return handle->pm_errno; } -const char SYMEXPORT *alpm_strerror(enum _pmerrno_t err) +const char SYMEXPORT *alpm_strerror(enum _alpm_errno_t err) { switch(err) { /* System */ diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 48b674c0..bb2ce50c 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -303,7 +303,7 @@ static char *canonicalize_path(const char *path) { return new_path; } -enum _pmerrno_t _alpm_set_directory_option(const char *value, +enum _alpm_errno_t _alpm_set_directory_option(const char *value, char **storage, int must_exist) { struct stat st; diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index c0078b0b..4b366193 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -72,7 +72,7 @@ struct __alpm_handle_t { pgp_verify_t sigverify; /* Default signature verification level */ /* error code */ - enum _pmerrno_t pm_errno; + enum _alpm_errno_t pm_errno; }; alpm_handle_t *_alpm_handle_new(void); @@ -81,7 +81,7 @@ void _alpm_handle_free(alpm_handle_t *handle); int _alpm_handle_lock(alpm_handle_t *handle); int _alpm_handle_unlock(alpm_handle_t *handle); -enum _pmerrno_t _alpm_set_directory_option(const char *value, +enum _alpm_errno_t _alpm_set_directory_option(const char *value, char **storage, int must_exist); #endif /* _ALPM_HANDLE_H */ diff --git a/src/pacman/conf.c b/src/pacman/conf.c index d3dbc9da..368e71fa 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -420,7 +420,7 @@ static int _add_mirror(alpm_db_t *db, char *value) static int setup_libalpm(void) { int ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; alpm_handle_t *handle; pm_printf(PM_LOG_DEBUG, "setup_libalpm called\n"); diff --git a/src/pacman/remove.c b/src/pacman/remove.c index eab8bdfc..d48b0386 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -102,7 +102,7 @@ int pacman_remove(alpm_list_t *targets) /* Step 2: prepare the transaction based on its type, targets and flags */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 5b06a806..20be450c 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -615,7 +615,7 @@ static int process_pkg(alpm_pkg_t *pkg) int ret = alpm_add_pkg(config->handle, pkg); if(ret == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); if(err == PM_ERR_TRANS_DUP_TARGET || err == PM_ERR_PKG_IGNORED) { /* just skip duplicate or ignored targets */ @@ -763,7 +763,7 @@ static int sync_trans(alpm_list_t *targets) /* Step 2: "compute" the transaction based on targets and flags */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { @@ -830,7 +830,7 @@ static int sync_trans(alpm_list_t *targets) } if(alpm_trans_commit(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c index 7f6e0986..31536a43 100644 --- a/src/pacman/upgrade.c +++ b/src/pacman/upgrade.c @@ -94,7 +94,7 @@ int pacman_upgrade(alpm_list_t *targets) /* Step 2: "compute" the transaction based on targets and flags */ /* TODO: No, compute nothing. This is stupid. */ if(alpm_trans_prepare(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerror(err)); switch(err) { @@ -162,7 +162,7 @@ int pacman_upgrade(alpm_list_t *targets) } if(alpm_trans_commit(config->handle, &data) == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerror(err)); switch(err) { diff --git a/src/pacman/util.c b/src/pacman/util.c index a661b2e9..6a93f6df 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -60,7 +60,7 @@ int trans_init(alpm_transflag_t flags) } if(ret == -1) { - enum _pmerrno_t err = alpm_errno(config->handle); + enum _alpm_errno_t err = alpm_errno(config->handle); pm_fprintf(stderr, PM_LOG_ERROR, _("failed to init transaction (%s)\n"), alpm_strerror(err)); if(err == PM_ERR_HANDLE_LOCK) { diff --git a/src/util/cleanupdelta.c b/src/util/cleanupdelta.c index 43897730..70fb7607 100644 --- a/src/util/cleanupdelta.c +++ b/src/util/cleanupdelta.c @@ -96,7 +96,7 @@ static void usage(void) { int main(int argc, char *argv[]) { const char *dbpath = DBPATH; - enum _pmerrno_t err; + enum _alpm_errno_t err; int a = 1; alpm_list_t *dbnames = NULL; diff --git a/src/util/pactree.c b/src/util/pactree.c index bdc1cb2f..7b87ac13 100644 --- a/src/util/pactree.c +++ b/src/util/pactree.c @@ -401,7 +401,7 @@ static void walk_deps(alpm_list_t *dblist, alpm_pkg_t *pkg, int depth) int main(int argc, char *argv[]) { int freelist = 0, ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; const char *target_name; alpm_pkg_t *pkg; alpm_list_t *dblist = NULL; diff --git a/src/util/testdb.c b/src/util/testdb.c index c887f6d5..b8ab33ca 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -180,7 +180,7 @@ static void usage(void) { int main(int argc, char *argv[]) { int ret = 0; - enum _pmerrno_t err; + enum _alpm_errno_t err; const char *dbpath = DBPATH; int a = 1; alpm_list_t *dbnames = NULL; diff --git a/src/util/testpkg.c b/src/util/testpkg.c index 70a395e8..a745984d 100644 --- a/src/util/testpkg.c +++ b/src/util/testpkg.c @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) { int retval = 1; /* default = false */ alpm_handle_t *handle; - enum _pmerrno_t err; + enum _alpm_errno_t err; alpm_pkg_t *pkg = NULL; if(argc != 2) { |