mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
Merge pull request #20486 from DaanDeMeyer/sd-bus-eproto
sd-bus: Return detailed (sd-buscntr) error from bus_container_connect_socket().
This commit is contained in:
commit
a622c58993
@ -75,8 +75,7 @@ int bus_container_connect_socket(sd_bus *b) {
|
||||
r = wait_for_terminate_and_check("(sd-buscntrns)", child, 0);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r != EXIT_SUCCESS)
|
||||
return -EPROTO;
|
||||
bool nonzero_exit_status = r != EXIT_SUCCESS;
|
||||
|
||||
n = read(pair[0], &error_buf, sizeof(error_buf));
|
||||
if (n < 0)
|
||||
@ -95,8 +94,11 @@ int bus_container_connect_socket(sd_bus *b) {
|
||||
return 1;
|
||||
|
||||
if (error_buf > 0)
|
||||
return log_debug_errno(error_buf, "Got error from (sd-buscntr): %m");
|
||||
return log_debug_errno(error_buf, "(sd-buscntr) failed to connect to D-Bus socket: %m");
|
||||
}
|
||||
|
||||
if (nonzero_exit_status)
|
||||
return -EPROTO;
|
||||
|
||||
return bus_socket_start_auth(b);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user