From 1c2e9646e4a1720fc8ad35c705c195ae1a2c5ce0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 30 Apr 2015 01:29:00 +0200 Subject: 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. --- src/core/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/device.c') 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. */ -- cgit v1.2.3-54-g00ecf