mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
core: use UNIT_TRIGGER at more places
Just some minor simplification.
This commit is contained in:
parent
672e9aec1b
commit
bc32241e6a
@ -2015,7 +2015,7 @@ int config_parse_trigger_unit(
|
||||
assert(rvalue);
|
||||
assert(data);
|
||||
|
||||
if (!hashmap_isempty(u->dependencies[UNIT_TRIGGERS])) {
|
||||
if (UNIT_TRIGGER(u)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0, "Multiple units to trigger specified, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ static int path_add_trigger_dependencies(Path *p) {
|
||||
|
||||
assert(p);
|
||||
|
||||
if (!hashmap_isempty(UNIT(p)->dependencies[UNIT_TRIGGERS]))
|
||||
if (UNIT_TRIGGER(UNIT(p)))
|
||||
return 0;
|
||||
|
||||
r = unit_load_related_unit(UNIT(p), ".service", &x);
|
||||
|
@ -124,7 +124,7 @@ static int timer_add_trigger_dependencies(Timer *t) {
|
||||
|
||||
assert(t);
|
||||
|
||||
if (!hashmap_isempty(UNIT(t)->dependencies[UNIT_TRIGGERS]))
|
||||
if (UNIT_TRIGGER(UNIT(t)))
|
||||
return 0;
|
||||
|
||||
r = unit_load_related_unit(UNIT(t), ".service", &x);
|
||||
|
Loading…
Reference in New Issue
Block a user