device: never act on mount events for devices if device support is not available
authorLennart Poettering <lennart@poettering.net>
Thu, 21 May 2015 18:43:21 +0000 (20:43 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 May 2015 18:49:24 +0000 (20:49 +0200)
src/core/device.c

index c784cab..e7efcf0 100644 (file)
@@ -771,6 +771,9 @@ int device_found_node(Manager *m, const char *node, bool add, DeviceFound found,
         assert(m);
         assert(node);
 
+        if (!device_supported())
+                return 0;
+
         /* This is called whenever we find a device referenced in
          * /proc/swaps or /proc/self/mounts. Such a device might be
          * mounted/enabled at a time where udev has not finished