1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

Merge pull request #2764 from benjarobin/fix-stdio-bridge

stdio-bridge: Correctly propagate error
This commit is contained in:
Ronny Chevalier 2016-02-29 12:23:55 +01:00
commit 3113d885fe

View File

@ -234,12 +234,14 @@ int main(int argc, char *argv[]) {
fd = sd_bus_get_fd(a); fd = sd_bus_get_fd(a);
if (fd < 0) { if (fd < 0) {
r = fd;
log_error_errno(r, "Failed to get fd: %m"); log_error_errno(r, "Failed to get fd: %m");
goto finish; goto finish;
} }
events_a = sd_bus_get_events(a); events_a = sd_bus_get_events(a);
if (events_a < 0) { if (events_a < 0) {
r = events_a;
log_error_errno(r, "Failed to get events mask: %m"); log_error_errno(r, "Failed to get events mask: %m");
goto finish; goto finish;
} }
@ -252,6 +254,7 @@ int main(int argc, char *argv[]) {
events_b = sd_bus_get_events(b); events_b = sd_bus_get_events(b);
if (events_b < 0) { if (events_b < 0) {
r = events_b;
log_error_errno(r, "Failed to get events mask: %m"); log_error_errno(r, "Failed to get events mask: %m");
goto finish; goto finish;
} }