diff options
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 7653850cd4..afd911d899 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -946,20 +946,29 @@ Manager* manager_free(Manager *m) { } int manager_enumerate(Manager *m) { - int r = 0, q; + int r = 0; UnitType c; assert(m); /* Let's ask every type to load all units from disk/kernel * that it might know */ - for (c = 0; c < _UNIT_TYPE_MAX; c++) - if (unit_vtable[c]->enumerate) { - q = unit_vtable[c]->enumerate(m); - if (q < 0) - r = q; + for (c = 0; c < _UNIT_TYPE_MAX; c++) { + int q; + + if (unit_vtable[c]->supported && !unit_vtable[c]->supported(m)) { + log_info("Unit type .%s is not supported on this system.", unit_type_to_string(c)); + continue; } + if (!unit_vtable[c]->enumerate) + continue; + + q = unit_vtable[c]->enumerate(m); + if (q < 0) + r = q; + } + manager_dispatch_load_queue(m); return r; } |