mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
various: fix error message for bus_wait_for_jobs_new()
As pointed out by Mike Yuan in review of grandparent commit, bus_wait_for_jobs_new() can also fail for non-oom reasons.
This commit is contained in:
parent
b2ce20aa0c
commit
f3f8bd6a38
|
@ -1483,7 +1483,7 @@ static int start_transient_scope(sd_bus *bus) {
|
|||
|
||||
r = bus_wait_for_jobs_new(bus, &w);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
return log_error_errno(r, "Could not watch jobs: %m");
|
||||
|
||||
if (arg_unit) {
|
||||
r = unit_name_mangle_with_suffix(arg_unit, "as unit",
|
||||
|
@ -1725,7 +1725,7 @@ static int start_transient_trigger(sd_bus *bus, const char *suffix) {
|
|||
|
||||
r = bus_wait_for_jobs_new(bus, &w);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
return log_error_errno(r, "Could not watch jobs: %m");
|
||||
|
||||
if (arg_unit) {
|
||||
switch (unit_name_to_type(arg_unit)) {
|
||||
|
|
|
@ -213,7 +213,7 @@ static int allocate_scope(void) {
|
|||
|
||||
r = bus_wait_for_jobs_new(bus, &w);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
return log_error_errno(r, "Could not watch jobs: %m");
|
||||
|
||||
if (asprintf(&scope, "%s-%" PRIx64 ".scope", program_invocation_short_name, random_u64()) < 0)
|
||||
return log_oom();
|
||||
|
|
Loading…
Reference in a new issue