chiark / gitweb /
systemctl: Correct error message printed when bus_process_wait fails
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sat, 23 Aug 2014 19:11:44 +0000 (21:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Aug 2014 18:37:05 +0000 (20:37 +0200)
Actually use the variable containing the return code of bus_process_wait when
printing the error message as a result of it failing.

src/systemctl/systemctl.c

index d9b8bee..6534819 100644 (file)
@@ -2382,7 +2382,7 @@ static int wait_for_jobs(sd_bus *bus, Set *s) {
         while (!set_isempty(s)) {
                 q = bus_process_wait(bus);
                 if (q < 0) {
-                        log_error("Failed to wait for response: %s", strerror(-r));
+                        log_error("Failed to wait for response: %s", strerror(-q));
                         return q;
                 }