1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

networkctl: show error message provided through dbus

Prompted by #23416.
This commit is contained in:
Yu Watanabe 2022-05-18 12:25:31 +09:00 committed by Luca Boccassi
parent 6910d43af5
commit 1246d09705

View File

@ -2746,7 +2746,7 @@ static int verb_reload(int argc, char *argv[], void *userdata) {
r = bus_call_method(bus, bus_network_mgr, "Reload", &error, NULL, NULL);
if (r < 0)
return log_error_errno(r, "Failed to reload network settings: %m");
return log_error_errno(r, "Failed to reload network settings: %s", bus_error_message(&error, r));
return 0;
}
@ -2777,8 +2777,9 @@ static int verb_reconfigure(int argc, char *argv[], void *userdata) {
index = PTR_TO_INT(p);
r = bus_call_method(bus, bus_network_mgr, "ReconfigureLink", &error, NULL, "i", index);
if (r < 0)
return log_error_errno(r, "Failed to reconfigure network interface %s: %m",
FORMAT_IFNAME_FULL(index, FORMAT_IFNAME_IFINDEX));
return log_error_errno(r, "Failed to reconfigure network interface %s: %s",
FORMAT_IFNAME_FULL(index, FORMAT_IFNAME_IFINDEX),
bus_error_message(&error, r));
}
return 0;