]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machinectl: shorten error logging a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Aug 2018 13:47:03 +0000 (15:47 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 6 Aug 2018 23:58:36 +0000 (08:58 +0900)
src/machine/machinectl.c

index f937cf7b93ed742991bd497394f5f9df5031d3b6..9ba9ea97e7b727482ea643b372eb89139757b27e 100644 (file)
@@ -1550,10 +1550,8 @@ static int shell_machine(int argc, char *argv[], void *userdata) {
                 return bus_log_create_error(r);
 
         r = sd_bus_call(bus, m, 0, &error, &reply);
-        if (r < 0) {
-                log_error("Failed to get shell PTY: %s", bus_error_message(&error, -r));
-                return r;
-        }
+        if (r < 0)
+                return log_error_errno(r, "Failed to get shell PTY: %s", bus_error_message(&error, -r));
 
         r = sd_bus_message_read(reply, "hs", &master, NULL);
         if (r < 0)