summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-08 10:18:56 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-06-08 10:18:56 +0200
commitb9c59555b1b06b28a8ec0d99348b7864d3ad5465 (patch)
treea6d2ac2665725ecb2ed13377c82ed6e24a476752 /src
parentea683512f9b82f2257770f0ed56d819eea230fc2 (diff)
sysv-generator: remove more dead code (#3462)
The changes in 788d2b088b13a2444b9eb2ea82c0cc57d9f0980f weren't complete, only half the code that dealt with K links was removed. This is a follow-up patch that removes the rest too. No functional changes.
Diffstat (limited to 'src')
-rw-r--r--src/sysv-generator/sysv-generator.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index 4e12071e93..3ed8f23ff9 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -856,7 +856,7 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
_cleanup_free_ char *name = NULL, *fpath = NULL;
int a, b;
- if (de->d_name[0] != 'S' && de->d_name[0] != 'K')
+ if (de->d_name[0] != 'S')
continue;
if (strlen(de->d_name) < 4)
@@ -886,28 +886,23 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
continue;
}
- if (de->d_name[0] == 'S') {
+ service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
- service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
-
- r = set_ensure_allocated(&runlevel_services[i], NULL);
- if (r < 0) {
- log_oom();
- goto finish;
- }
-
- r = set_put(runlevel_services[i], service);
- if (r < 0) {
- log_oom();
- goto finish;
- }
+ r = set_ensure_allocated(&runlevel_services[i], NULL);
+ if (r < 0) {
+ log_oom();
+ goto finish;
+ }
+ r = set_put(runlevel_services[i], service);
+ if (r < 0) {
+ log_oom();
+ goto finish;
}
}
}
}
-
for (i = 0; i < ELEMENTSOF(rcnd_table); i ++)
SET_FOREACH(service, runlevel_services[i], j) {
r = strv_extend(&service->before, rcnd_table[i].target);