mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-01 20:58:21 +03:00
machined: properly propagate long-running operation errors
Actually initialize the "error" structure with the error we got
This commit is contained in:
parent
d01cd40196
commit
3aca8326bd
@ -61,8 +61,10 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat
|
|||||||
} else {
|
} else {
|
||||||
/* The default operation when done is to simply return an error on failure or an empty success
|
/* The default operation when done is to simply return an error on failure or an empty success
|
||||||
* message on success. */
|
* message on success. */
|
||||||
if (r < 0)
|
if (r < 0) {
|
||||||
|
sd_bus_error_set_errno(&error, r);
|
||||||
goto fail;
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
r = sd_bus_reply_method_return(o->message, NULL);
|
r = sd_bus_reply_method_return(o->message, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user