summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-13 19:39:31 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-17 10:22:28 +0100
commit3aca8326bda2c6e8d8ddd99ef5cab63cc7a9af1c (patch)
treedc1b066fe9418cefefcaf1593915d449c77f68f3 /src/machine
parentd01cd40196eb18d859b3c416505ceb1d4ba398ac (diff)
machined: properly propagate long-running operation errors
Actually initialize the "error" structure with the error we got
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/operation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/machine/operation.c b/src/machine/operation.c
index c966d0d21c..f7d5310f44 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)