mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
Merge pull request #7387 from yuwata/fix-7370
core: load() should fail when the corresponding unit file does not exist
This commit is contained in:
commit
df8ca63396
@ -224,7 +224,7 @@ static int automount_load(Unit *u) {
|
|||||||
assert(u->load_state == UNIT_STUB);
|
assert(u->load_state == UNIT_STUB);
|
||||||
|
|
||||||
/* Load a .automount file */
|
/* Load a .automount file */
|
||||||
r = unit_load_fragment_and_dropin_optional(u);
|
r = unit_load_fragment_and_dropin(u);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
@ -292,7 +292,10 @@ static int swap_load(Unit *u) {
|
|||||||
assert(u->load_state == UNIT_STUB);
|
assert(u->load_state == UNIT_STUB);
|
||||||
|
|
||||||
/* Load a .swap file */
|
/* Load a .swap file */
|
||||||
r = unit_load_fragment_and_dropin_optional(u);
|
if (SWAP(u)->from_proc_swaps)
|
||||||
|
r = unit_load_fragment_and_dropin_optional(u);
|
||||||
|
else
|
||||||
|
r = unit_load_fragment_and_dropin(u);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user