]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machined: properly propagate long-running operation errors
authorLennart Poettering <lennart@poettering.net>
Mon, 13 Feb 2017 18:39:31 +0000 (19:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 17 Feb 2017 09:22:28 +0000 (10:22 +0100)
Actually initialize the "error" structure with the error we got

src/machine/operation.c

index c966d0d21c07da26493cf2bcc9b7fe48a1887884..f7d5310f44395a0d5b181df94b4ac9f8ecb7a781 100644 (file)
@@ -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)