diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-04-30 01:29:00 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-04-30 01:29:00 +0200 |
commit | 1c2e9646e4a1720fc8ad35c705c195ae1a2c5ce0 (patch) | |
tree | 3d7f61210c0b45fb1f1fa61629c2b5825a0c43e9 /src/core/manager.c | |
parent | 524d896ac17518b824b2c94b3b0b2a23c23da08f (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/manager.c')
-rw-r--r-- | src/core/manager.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |