diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-08 18:11:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-08 18:12:45 +0100 |
commit | 9588bc32096fc8342bfd8b989689717186d7d86e (patch) | |
tree | 774cf93f0544add18f8307714062cc18f97838da /src/core/manager.c | |
parent | f842cd74eacc2960ac849766eb786059317415ee (diff) |
Remove dead code and unexport some calls
"make check-api-unused" informs us about code that is not used anymore
or that is exported but only used internally. Fix these all over the
place.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index c75c1e1a4e..07ca4c92f7 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -800,7 +800,7 @@ int manager_enumerate(Manager *m) { return r; } -int manager_coldplug(Manager *m) { +static int manager_coldplug(Manager *m) { int r = 0, q; Iterator i; Unit *u; @@ -880,6 +880,29 @@ fail: m->unit_path_cache = NULL; } + +static int manager_distribute_fds(Manager *m, FDSet *fds) { + Unit *u; + Iterator i; + int r; + + assert(m); + + HASHMAP_FOREACH(u, m->units, i) { + + if (fdset_size(fds) <= 0) + break; + + if (UNIT_VTABLE(u)->distribute_fds) { + r = UNIT_VTABLE(u)->distribute_fds(u, fds); + if (r < 0) + return r; + } + } + + return 0; +} + int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { int r, q; @@ -1187,7 +1210,7 @@ void manager_clear_jobs(Manager *m) { job_finish_and_invalidate(j, JOB_CANCELED, false); } -unsigned manager_dispatch_run_queue(Manager *m) { +static unsigned manager_dispatch_run_queue(Manager *m) { Job *j; unsigned n = 0; @@ -1215,7 +1238,7 @@ unsigned manager_dispatch_run_queue(Manager *m) { return n; } -unsigned manager_dispatch_dbus_queue(Manager *m) { +static unsigned manager_dispatch_dbus_queue(Manager *m) { Job *j; Unit *u; unsigned n = 0; @@ -2298,28 +2321,6 @@ finish: return r; } -int manager_distribute_fds(Manager *m, FDSet *fds) { - Unit *u; - Iterator i; - int r; - - assert(m); - - HASHMAP_FOREACH(u, m->units, i) { - - if (fdset_size(fds) <= 0) - break; - - if (UNIT_VTABLE(u)->distribute_fds) { - r = UNIT_VTABLE(u)->distribute_fds(u, fds); - if (r < 0) - return r; - } - } - - return 0; -} - int manager_reload(Manager *m) { int r, q; _cleanup_fclose_ FILE *f = NULL; |