summaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-30 01:29:00 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-30 01:29:00 +0200
commit1c2e9646e4a1720fc8ad35c705c195ae1a2c5ce0 (patch)
tree3d7f61210c0b45fb1f1fa61629c2b5825a0c43e9 /src/core/device.c
parent524d896ac17518b824b2c94b3b0b2a23c23da08f (diff)
core: simplify unit type detection logic
Introduce a new call unit_type_supported() and make use of it everywhere. Also, drop Manager parameter from per-type supported method prototype.
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 5656c96669..f8e65b876f 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -750,9 +750,8 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
return 0;
}
-static bool device_supported(Manager *m) {
+static bool device_supported(void) {
static int read_only = -1;
- assert(m);
/* If /sys is read-only we don't support device units, and any
* attempts to start one should fail immediately. */