From accdd018ede77ef1c057775396c18c73406cbcb4 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sat, 5 Oct 2013 17:28:09 +0200 Subject: mount/service: drop FsckPassNo support We now treat passno as boleans in the generators, and don't need this any more. fsck itself is able to sequentialize checks on the same local media, so in the common case the ordering is redundant. It is still possible to force an order by using .d fragments, in case that is desired. --- src/core/service.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'src/core/service.c') diff --git a/src/core/service.c b/src/core/service.c index 96ed2d303a..ce75757021 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1056,48 +1056,6 @@ static int service_load_sysv(Service *s) { } #endif -static int fsck_fix_order(Service *s) { - Unit *other; - int r; - - assert(s); - - if (s->fsck_passno <= 0) - return 0; - - /* For each pair of services where both have an fsck priority - * we order things based on it. */ - - LIST_FOREACH(units_by_type, other, UNIT(s)->manager->units_by_type[UNIT_SERVICE]) { - Service *t; - UnitDependency d; - - t = SERVICE(other); - - if (s == t) - continue; - - if (UNIT(t)->load_state != UNIT_LOADED) - continue; - - if (t->fsck_passno <= 0) - continue; - - if (t->fsck_passno < s->fsck_passno) - d = UNIT_AFTER; - else if (t->fsck_passno > s->fsck_passno) - d = UNIT_BEFORE; - else - continue; - - r = unit_add_dependency(UNIT(s), d, UNIT(t), true); - if (r < 0) - return r; - } - - return 0; -} - static int service_verify(Service *s) { assert(s); @@ -1254,10 +1212,6 @@ static int service_load(Unit *u) { return r; #endif - r = fsck_fix_order(s); - if (r < 0) - return r; - if (s->bus_name) if ((r = unit_watch_bus_name(u, s->bus_name)) < 0) return r; @@ -1381,11 +1335,6 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) { prefix, s->sysv_runlevels); #endif - if (s->fsck_passno > 0) - fprintf(f, - "%sFsckPassNo: %i\n", - prefix, s->fsck_passno); - if (s->status_text) fprintf(f, "%sStatus Text: %s\n", prefix, s->status_text); -- cgit v1.2.3-54-g00ecf