device: never act on mount events for devices if device support is not available

This commit is contained in:
Lennart Poettering 2015-05-21 20:43:21 +02:00
parent 48894cd07c
commit 4c6d20dece
1 changed files with 3 additions and 0 deletions

View 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