summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/alpm.h3
-rw-r--r--lib/libalpm/log.c4
-rw-r--r--lib/libalpm/trans.c4
-rw-r--r--lib/libalpm/util.h5
4 files changed, 10 insertions, 6 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 729a4c81..14443bb7 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -271,8 +271,9 @@ typedef enum _alpm_loglevel_t {
} alpm_loglevel_t;
typedef void (*alpm_cb_log)(alpm_loglevel_t, const char *, va_list);
+
int alpm_logaction(alpm_handle_t *handle, const char *prefix,
- const char *fmt, ...);
+ const char *fmt, ...) __attribute__((format(printf, 3, 4)));
/**
* Events.
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index a8639b4c..271bd00d 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -39,8 +39,8 @@
* @param fmt output format
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix, const
- char *fmt, ...)
+int SYMEXPORT alpm_logaction(alpm_handle_t *handle, const char *prefix,
+ const char *fmt, ...)
{
int ret;
va_list args;
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index b0488ebc..8d4e0e73 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -218,8 +218,8 @@ int SYMEXPORT alpm_trans_release(alpm_handle_t *handle)
if(_alpm_handle_unlock(handle)) {
_alpm_log(handle, ALPM_LOG_WARNING, _("could not remove lock file %s\n"),
handle->lockfile);
- alpm_logaction(handle, "warning: could not remove lock file %s\n",
- handle->lockfile);
+ alpm_logaction(handle, ALPM_CALLER_PREFIX,
+ "warning: could not remove lock file %s\n", handle->lockfile);
}
}
diff --git a/lib/libalpm/util.h b/lib/libalpm/util.h
index 93b65730..56031f3e 100644
--- a/lib/libalpm/util.h
+++ b/lib/libalpm/util.h
@@ -120,7 +120,10 @@ int _alpm_unpack(alpm_handle_t *handle, const char *archive, const char *prefix,
alpm_list_t *list, int breakfirst);
ssize_t _alpm_files_in_directory(alpm_handle_t *handle, const char *path, int full_count);
-int _alpm_logaction(alpm_handle_t *handle, const char *prefix, const char *fmt, va_list args);
+
+int _alpm_logaction(alpm_handle_t *handle, const char *prefix, const char *fmt, va_list args)
+ __attribute__((format(printf, 3, 0)));
+
int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[]);
int _alpm_ldconfig(alpm_handle_t *handle);
int _alpm_str_cmp(const void *s1, const void *s2);