From: Vsevolod Stakhov Date: Wed, 31 Aug 2016 20:37:27 +0000 (+0100) Subject: [Minor] Do not blame about unsupported file locks X-Git-Tag: 1.4.0~510 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79531455754d90ce00a3f0486d21bdc62a346c5f;p=rspamd.git [Minor] Do not blame about unsupported file locks --- 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; }