diff options
author | Allan McRae <mcrae_allan@hotmail.com> | 2008-05-11 05:30:27 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-05-12 03:05:28 +0200 |
commit | 3c3cb001a441656c2afba62f0361b83d4987339c (patch) | |
tree | 93434e85ea3ea40e6aa45009b9c11b67e4555e87 /src/pacman/remove.c | |
parent | 3175faace439158f5c18b20bb2358e845c4167e0 (diff) | |
download | pacman-3c3cb001a441656c2afba62f0361b83d4987339c.tar.gz pacman-3c3cb001a441656c2afba62f0361b83d4987339c.tar.xz |
Make all error messages use pm_fprintf
Tested using many easily generated error conditions. Also added "malloc
failure" (conf.c) and "segmentation fault" (pacman.c) error messages for
translation.
Signed-off-by: Allan McRae <mcrae_allan@hotmail.com>
[Dan: fix trailing whitespace errors, other compilation issues]
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r-- | src/pacman/remove.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c index a2209ac6..4fe9bc81 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -86,7 +86,7 @@ int pacman_remove(alpm_list_t *targets) for(i = finaltargs; i; i = alpm_list_next(i)) { char *targ = alpm_list_getdata(i); if(alpm_trans_addtarget(targ) == -1) { - fprintf(stderr, _("error: '%s': %s\n"), + pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", targ, alpm_strerrorlast()); trans_release(); FREELIST(finaltargs); @@ -96,7 +96,7 @@ int pacman_remove(alpm_list_t *targets) /* Step 2: prepare the transaction based on its type, targets and flags */ if(alpm_trans_prepare(&data) == -1) { - fprintf(stderr, _("error: failed to prepare transaction (%s)\n"), + pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerrorlast()); switch(pm_errno) { case PM_ERR_UNSATISFIED_DEPS: @@ -142,7 +142,7 @@ int pacman_remove(alpm_list_t *targets) /* Step 3: actually perform the removal */ if(alpm_trans_commit(NULL) == -1) { - fprintf(stderr, _("error: failed to commit transaction (%s)\n"), + pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerrorlast()); trans_release(); FREELIST(finaltargs); |