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.3.5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00718f10ec5236545df5c604b2f6f78b9517eecb;p=thirdparty%2Frspamd.git [Minor] Do not blame about unsupported file locks --- diff --git a/src/libutil/util.c b/src/libutil/util.c index 762c8d5572..1ad4c6945d 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; }