1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

transaction: drop bus error arg from transaction_add_propagate_reload_jobs()

We erase the error anyway always, hence no point in even passing
anything in from callers.
This commit is contained in:
Lennart Poettering 2023-06-20 13:07:53 +02:00
parent c25eeb65c0
commit 3044510d58
3 changed files with 9 additions and 12 deletions

View File

@ -2147,8 +2147,7 @@ int manager_propagate_reload(Manager *m, Unit *unit, JobMode mode, sd_bus_error
tr,
unit,
tr->anchor_job,
mode == JOB_IGNORE_DEPENDENCIES ? TRANSACTION_IGNORE_ORDER : 0,
e);
mode == JOB_IGNORE_DEPENDENCIES ? TRANSACTION_IGNORE_ORDER : 0);
r = transaction_activate(tr, m, mode, NULL, e);
if (r < 0)

View File

@ -878,8 +878,7 @@ void transaction_add_propagate_reload_jobs(
Transaction *tr,
Unit *unit,
Job *by,
TransactionAddFlags flags,
sd_bus_error *e) {
TransactionAddFlags flags) {
JobType nt;
Unit *dep;
@ -889,17 +888,17 @@ void transaction_add_propagate_reload_jobs(
assert(unit);
UNIT_FOREACH_DEPENDENCY(dep, unit, UNIT_ATOM_PROPAGATES_RELOAD_TO) {
_cleanup_(sd_bus_error_free) sd_bus_error e = SD_BUS_ERROR_NULL;
nt = job_type_collapse(JOB_TRY_RELOAD, dep);
if (nt == JOB_NOP)
continue;
r = transaction_add_job_and_dependencies(tr, nt, dep, by, flags, e);
if (r < 0) {
r = transaction_add_job_and_dependencies(tr, nt, dep, by, flags, &e);
if (r < 0)
log_unit_warning(dep,
"Cannot add dependency reload job, ignoring: %s",
bus_error_message(e, r));
sd_bus_error_free(e);
}
bus_error_message(&e, r));
}
}
@ -1099,7 +1098,7 @@ int transaction_add_job_and_dependencies(
}
if (type == JOB_RELOAD)
transaction_add_propagate_reload_jobs(tr, ret->unit, ret, flags & TRANSACTION_IGNORE_ORDER, e);
transaction_add_propagate_reload_jobs(tr, ret->unit, ret, flags & TRANSACTION_IGNORE_ORDER);
/* JOB_VERIFY_ACTIVE requires no dependency handling */
}

View File

@ -30,8 +30,7 @@ typedef enum TransactionAddFlags {
void transaction_add_propagate_reload_jobs(
Transaction *tr,
Unit *unit, Job *by,
TransactionAddFlags flags,
sd_bus_error *e);
TransactionAddFlags flags);
int transaction_add_job_and_dependencies(
Transaction *tr,