From: Lennart Poettering Date: Mon, 13 Feb 2017 18:39:31 +0000 (+0100) Subject: machined: properly propagate long-running operation errors X-Git-Tag: v233~80^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3aca8326bda2c6e8d8ddd99ef5cab63cc7a9af1c;p=thirdparty%2Fsystemd.git machined: properly propagate long-running operation errors Actually initialize the "error" structure with the error we got --- diff --git a/src/machine/operation.c b/src/machine/operation.c index c966d0d21c0..f7d5310f443 100644 --- a/src/machine/operation.c +++ b/src/machine/operation.c @@ -61,8 +61,10 @@ static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdat } else { /* The default operation when done is to simply return an error on failure or an empty success * message on success. */ - if (r < 0) + if (r < 0) { + sd_bus_error_set_errno(&error, r); goto fail; + } r = sd_bus_reply_method_return(o->message, NULL); if (r < 0)