summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-08 02:55:13 +0200
committerDan McGee <dan@archlinux.org>2007-06-09 18:57:50 +0200
commita32ca90192ea2b2df2fadb820c9e47bbaec93151 (patch)
tree7f105ea98d8fbc52ed978c7efe4a4204e33a22f2 /src/util
parentfc93601b9887ec42cd71339099eadc6fb7b775e5 (diff)
downloadpacman-a32ca90192ea2b2df2fadb820c9e47bbaec93151.tar.gz
pacman-a32ca90192ea2b2df2fadb820c9e47bbaec93151.tar.xz
Remove logmask stuff from backend; switch logging callback to new pm_printf
Remove the logmask functionality from the backend as it has been moved to the frontend, and change the logging callback function to use pm_printf. In addition, make much better use of va_list- use the args list instead of a arbitrarily chosen string to print to in the logging functions. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/testpkg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/testpkg.c b/src/util/testpkg.c
index 66569f1e..1ad1d14b 100644
--- a/src/util/testpkg.c
+++ b/src/util/testpkg.c
@@ -23,20 +23,21 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <string.h>
#include <libgen.h>
#include <alpm.h>
-void output_cb(pmloglevel_t level, char *msg)
+void output_cb(pmloglevel_t level, char *fmt, va_list args)
{
- if(strlen(msg)) {
+ if(strlen(fmt)) {
switch(level) {
case PM_LOG_ERROR: printf("error: "); break;
case PM_LOG_WARNING: printf("warning: "); break;
default: break;
}
- puts(msg);
+ vprintf(fmt, args);
}
}