return 0;
}
-static bool device_supported(void) {
- static int read_only = -1;
-
- /* If /sys is read-only we don't support device units, and any
- * attempts to start one should fail immediately. */
-
- if (read_only < 0)
- read_only = path_is_read_only_fs("/sys");
-
- return read_only <= 0;
-}
-
static int validate_node(Manager *m, const char *node, sd_device **ret) {
struct stat st;
int r;
assert(m);
assert(node);
- if (!device_supported())
+ if (!udev_available())
return;
if (mask == 0)
.enumerate = device_enumerate,
.shutdown = device_shutdown,
- .supported = device_supported,
+ .supported = udev_available,
.status_message_formats = {
.starting_stopping = {