diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-09-28 23:45:35 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-09-30 04:56:21 +0200 |
commit | b52ed49d75ff77ef4f6ad2bef576184bda9b98d0 (patch) | |
tree | b4c7f71acf22f05302ebaf76967f18521a713275 /lib/libalpm/handle.c | |
parent | 31b98626003fec9e33483152552906a601c072d4 (diff) | |
download | pacman-b52ed49d75ff77ef4f6ad2bef576184bda9b98d0.tar.gz pacman-b52ed49d75ff77ef4f6ad2bef576184bda9b98d0.tar.xz |
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 <andrew.gregory.8@gmail.com>
Conflicts:
lib/libalpm/alpm.h
src/pacman/callback.c
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r-- | lib/libalpm/handle.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 7652d1f7..0d8ea34a 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -143,6 +143,12 @@ int _alpm_handle_unlock(alpm_handle_t *handle) } +alpm_cb_log SYMEXPORT alpm_option_get_logcb(alpm_handle_t *handle) +{ + CHECK_HANDLE(handle, return NULL); + return handle->logcb; +} + alpm_cb_download SYMEXPORT alpm_option_get_dlcb(alpm_handle_t *handle) { CHECK_HANDLE(handle, return NULL); @@ -263,6 +269,13 @@ int SYMEXPORT alpm_option_get_checkspace(alpm_handle_t *handle) return handle->checkspace; } +int SYMEXPORT alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb) +{ + CHECK_HANDLE(handle, return -1); + handle->logcb = cb; + return 0; +} + int SYMEXPORT alpm_option_set_dlcb(alpm_handle_t *handle, alpm_cb_download cb) { CHECK_HANDLE(handle, return -1); |