[platform] makes fsnotifier look for '/proc/mounts' if '/etc/mtab' is missing (IDEA...
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 17 Dec 2018 18:13:21 +0000 (19:13 +0100)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 17 Dec 2018 18:13:21 +0000 (19:13 +0100)
bin/linux/fsnotifier
bin/linux/fsnotifier64
native/fsNotifier/linux/fsnotifier.h
native/fsNotifier/linux/main.c

index d00f8950e3071de6a6b58fe04c5ad4a2073bf6b0..ddc4d1655c65233e0c19afc89deed0207563c71d 100755 (executable)
Binary files a/bin/linux/fsnotifier and b/bin/linux/fsnotifier differ
index 0955255a9c35d5c062c0feb06f0a575ac77ab4d9..b77d5664a1722cc1b9e36d011248ed3e59b3b5d7 100755 (executable)
Binary files a/bin/linux/fsnotifier64 and b/bin/linux/fsnotifier64 differ
index e228aa8dca3f543bd7ec8e58496c4f1bb55c6b09..4fefec2ebf16338f8b8307f437c62328edf429dd 100644 (file)
@@ -16,7 +16,7 @@
 
 #pragma once
 
-#define VERSION "20160218.1348"
+#define VERSION "20181217.1910"
 
 #include <stdbool.h>
 #include <stdio.h>
index 26d9f3795970e4c4e760b7ba021b62fea67ae654..b2accd8de3278339846dcb78879935baeba7d3c7 100644 (file)
@@ -411,6 +411,9 @@ static bool is_watchable(const char* fs) {
 
 static array* unwatchable_mounts() {
   FILE* mtab = setmntent(_PATH_MOUNTED, "r");
+  if (mtab == NULL && errno == ENOENT) {
+    mtab = setmntent("/proc/mounts", "r");
+  }
   if (mtab == NULL) {
     userlog(LOG_ERR, "cannot open " _PATH_MOUNTED);
     return NULL;