summaryrefslogtreecommitdiff
path: root/src/errors.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2010-10-16 07:35:27 +0200
committerGuillem Jover <guillem@debian.org>2010-11-19 05:21:13 +0100
commitfd84ba8969bf305d97c225b44858965e53a0cb66 (patch)
tree2f1e9e5e5694a13c29ed3bc907867a78f14b1a76 /src/errors.c
parentdc98261980767f258046f8a4c2e020fcdc92c8b6 (diff)
downloaddpkg-fd84ba8969bf305d97c225b44858965e53a0cb66.tar.gz
Use thisname variable instead of hard-coded 'dpkg' string
This corrects the current program name printed by other tools.
Diffstat (limited to 'src/errors.c')
-rw-r--r--src/errors.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/errors.c b/src/errors.c
index 88c2210ca..3b4ceac53 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -58,13 +58,15 @@ void print_error_perpackage(const char *emsg, const char *arg) {
struct error_report *nr;
fprintf(stderr, _("%s: error processing %s (--%s):\n %s\n"),
- DPKG, arg, cipaction->olong, emsg);
+ thisname, arg, cipaction->olong, emsg);
statusfd_send("status: %s : %s : %s", arg, "error", emsg);
nr= malloc(sizeof(struct error_report));
if (!nr) {
- perror(_("dpkg: failed to allocate memory for new entry in list of failed packages."));
+ fprintf(stderr,
+ _("%s: failed to allocate memory for new entry in list of failed packages: %s"),
+ thisname, strerror(errno));
abort_processing = true;
nr= &emergency;
}
@@ -74,7 +76,7 @@ void print_error_perpackage(const char *emsg, const char *arg) {
lastreport= &nr->next;
if (nerrs++ < errabort) return;
- fprintf(stderr, _("dpkg: too many errors, stopping\n"));
+ fprintf(stderr, _("%s: too many errors, stopping\n"), thisname);
abort_processing = true;
}