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/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/manager.c') diff --git a/src/core/manager.c b/src/core/manager.c index cf7337eff5..b49452151b 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -975,7 +975,7 @@ int manager_enumerate(Manager *m) { for (c = 0; c < _UNIT_TYPE_MAX; c++) { int q; - if (unit_vtable[c]->supported && !unit_vtable[c]->supported(m)) { + if (!unit_type_supported(c)) { log_debug("Unit type .%s is not supported on this system.", unit_type_to_string(c)); continue; } -- cgit v1.2.3-54-g00ecf