From 03b9bf08ac3b1e3f2c3b950ce995654af2c40503 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Fri, 1 Aug 2014 14:19:50 -0700 Subject: handle_unlock: log lock removal failure Rather than have individual callers log failure, just do it directly in _alpm_handle_unlock. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/handle.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libalpm/handle.c') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index b218a689..234fc4d0 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -126,6 +126,10 @@ int _alpm_handle_unlock(alpm_handle_t *handle) handle->lockfd = -1; if(unlink(handle->lockfile) && errno != ENOENT) { + _alpm_log(handle, ALPM_LOG_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); return -1; } return 0; -- cgit v1.2.3-24-g4f1b