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/automount.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/automount.c') diff --git a/src/core/automount.c b/src/core/automount.c index b1109bd67c..73b75f163e 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -1012,11 +1012,9 @@ static void automount_reset_failed(Unit *u) { a->result = AUTOMOUNT_SUCCESS; } -static bool automount_supported(Manager *m) { +static bool automount_supported(void) { static int supported = -1; - assert(m); - if (supported < 0) supported = access("/dev/autofs", F_OK) >= 0; -- cgit v1.2.3-54-g00ecf