mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-27 14:03:43 +03:00
core: move checking default_dependencies into target_add_default_dependencies. (#5762)
Almost units check default_dependencies within [unit]_add_default_dependencies except target unit.
This commit is contained in:
parent
a2c74c0ce8
commit
41c237af80
@ -63,6 +63,9 @@ static int target_add_default_dependencies(Target *t) {
|
||||
|
||||
assert(t);
|
||||
|
||||
if (!UNIT(t)->default_dependencies)
|
||||
return 0;
|
||||
|
||||
/* Imply ordering for requirement dependencies on target
|
||||
* units. Note that when the user created a contradicting
|
||||
* ordering manually we won't add anything in here to make
|
||||
@ -93,7 +96,7 @@ static int target_load(Unit *u) {
|
||||
return r;
|
||||
|
||||
/* This is a new unit? Then let's add in some extras */
|
||||
if (u->load_state == UNIT_LOADED && u->default_dependencies) {
|
||||
if (u->load_state == UNIT_LOADED) {
|
||||
r = target_add_default_dependencies(t);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user