From 79531455754d90ce00a3f0486d21bdc62a346c5f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 31 Aug 2016 21:37:27 +0100 Subject: [PATCH] [Minor] Do not blame about unsupported file locks --- src/libutil/util.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/libutil/util.c b/src/libutil/util.c index 762c8d557..1ad4c6945 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1271,7 +1271,11 @@ rspamd_file_lock (gint fd, gboolean async) if (async && errno == EAGAIN) { return FALSE; } - msg_warn ("lock on file failed: %s", strerror (errno)); + + if (errno != ENOTSUP) { + msg_warn ("lock on file failed: %s", strerror (errno)); + } + return FALSE; } @@ -1294,7 +1298,11 @@ rspamd_file_unlock (gint fd, gboolean async) if (async && errno == EAGAIN) { return FALSE; } - msg_warn ("lock on file failed: %s", strerror (errno)); + + if (errno != ENOTSUP) { + msg_warn ("unlock on file failed: %s", strerror (errno)); + } + return FALSE; } @@ -1317,7 +1325,10 @@ rspamd_file_lock (gint fd, gboolean async) if (async && (errno == EAGAIN || errno == EACCES)) { return FALSE; } - msg_warn ("lock on file failed: %s", strerror (errno)); + if (errno != ENOTSUP) { + msg_warn ("lock on file failed: %s", strerror (errno)); + } + return FALSE; } @@ -1338,7 +1349,10 @@ rspamd_file_unlock (gint fd, gboolean async) if (async && (errno == EAGAIN || errno == EACCES)) { return FALSE; } - msg_warn ("lock on file failed: %s", strerror (errno)); + + if (errno != ENOTSUP) { + msg_warn ("unlock on file failed: %s", strerror (errno)); + } return FALSE; } -- 2.39.5