summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2008-12-05 08:11:59 +0200
committerGuillem Jover <guillem@debian.org>2008-12-05 08:11:59 +0200
commitb56f46bba29e6a369105d75428ceffc3b79de346 (patch)
treee9b91f8116b3a57aee5ee79a887c570bca9c1f4e /lib
parentdecb92e45369aea1969c3e3220610728bc36ceb6 (diff)
downloaddpkg-b56f46bba29e6a369105d75428ceffc3b79de346.tar.gz
Use the warning function instead of hand-coded print calls
Diffstat (limited to 'lib')
-rw-r--r--lib/ehandle.c2
-rw-r--r--lib/mlib.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/ehandle.c b/lib/ehandle.c
index ec963b318..84f510c37 100644
--- a/lib/ehandle.c
+++ b/lib/ehandle.c
@@ -299,7 +299,7 @@ warning(const char *fmt, ...)
vsnprintf(buf,sizeof(buf),fmt,al);
va_end(al);
- fprintf(stderr, "%s\n", buf);
+ fprintf(stderr, _("%s: warning: %s\n"), thisname, buf);
}
void badusage(const char *fmt, ...) {
diff --git a/lib/mlib.c b/lib/mlib.c
index 9fde251ab..2d7136eaf 100644
--- a/lib/mlib.c
+++ b/lib/mlib.c
@@ -125,14 +125,13 @@ int checksubprocerr(int status, const char *description, int flags) {
if (flags & PROCNOERR)
return -1;
if (flags & PROCWARN)
- fprintf(stderr, _("dpkg: warning - %s returned error exit status %d\n"),
- description, n);
+ warning(_("%s returned error exit status %d"), description, n);
else
ohshit(_("subprocess %s returned error exit status %d"), description, n);
} else if (WIFSIGNALED(status)) {
n= WTERMSIG(status); if (!n || ((flags & PROCPIPE) && n==SIGPIPE)) return 0;
if (flags & PROCWARN)
- fprintf(stderr, _("dpkg: warning - %s killed by signal (%s)%s\n"),
+ warning(_("%s killed by signal (%s)%s"),
description, strsignal(n), WCOREDUMP(status) ? _(", core dumped") : "");
else
ohshit(_("subprocess %s killed by signal (%s)%s"),