]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not blame about unsupported file locks
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 31 Aug 2016 20:37:27 +0000 (21:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 31 Aug 2016 20:37:27 +0000 (21:37 +0100)
src/libutil/util.c

index 762c8d55725bfccdfaff1f3e8c8911ee7bd909c4..1ad4c6945d106de052a4469e9cd9867125f33ce7 100644 (file)
@@ -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;
        }