From b52ed49d75ff77ef4f6ad2bef576184bda9b98d0 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sun, 28 Sep 2014 17:45:35 -0400 Subject: Revert "Remove log_cb, add ALPM_EVENT_LOG instead" Moving logging to the event callback caused warnings under clang due to non-literal format strings and silenced all log messages when --print was used. This reverts commit cd793c5ab7689cc8cbc18277375b368060e5acfe. Signed-off-by: Andrew Gregory Conflicts: lib/libalpm/alpm.h src/pacman/callback.c Signed-off-by: Allan McRae --- src/pacman/callback.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pacman/callback.h') diff --git a/src/pacman/callback.h b/src/pacman/callback.h index e4941fc7..5480c73d 100644 --- a/src/pacman/callback.h +++ b/src/pacman/callback.h @@ -39,6 +39,10 @@ void cb_dl_total(off_t total); /* callback to handle display of download progress */ void cb_dl_progress(const char *filename, off_t file_xfered, off_t file_total); +/* callback to handle messages/notifications from pacman library */ +__attribute__((format(printf, 2, 0))) +void cb_log(alpm_loglevel_t level, const char *fmt, va_list args); + #endif /* _PM_CALLBACK_H */ /* vim: set noet: */ -- cgit v1.2.3-24-g4f1b