systemd/0030-machinectl-handle-EOPNOTSUPP-from-print_addresses-49.patch
Zbigniew Jędrzejewski-Szmek 5d6eedd538 Moar patches
2017-01-31 12:11:17 -05:00

26 lines
1.0 KiB
Diff

From d3d04283c458c1313ed87a12af538d8e0540e88d Mon Sep 17 00:00:00 2001
From: Graeme Lawes <graemelawes@gmail.com>
Date: Sun, 25 Dec 2016 06:14:41 -0500
Subject: [PATCH] machinectl: handle EOPNOTSUPP from print_addresses (#4979)
Print addresses returns EOPNOTSUPP, not ENOSYS, when trying to print
addresses for non-container machines.
(cherry picked from commit 3a0a40d1667e53b623e891527871e9f3ee6cb7b4)
---
src/machine/machinectl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index d54caecf46..f84226f58f 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -326,7 +326,7 @@ static int list_machines(int argc, char *argv[], void *userdata) {
(int) max_version_id, strdash_if_empty(machines[j].version_id));
r = print_addresses(bus, machines[j].name, 0, "", prefix, arg_addrs);
- if (r == -ENOSYS)
+ if (r == -EOPNOTSUPP)
printf("-\n");
}