summaryrefslogtreecommitdiffstats
path: root/src/network/networkctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-06-04 12:01:52 +0200
committerGitHub <noreply@github.com>2019-06-04 12:01:52 +0200
commitaafec74d049483f1fe66cde24d580020734af32c (patch)
treee97ad7dc3a687a5cda3a23576c84d40771864eea /src/network/networkctl.c
parentMerge pull request #12734 from keszybz/cpu-set-util-on-i386 (diff)
parentbusctl: always prefix bus error message with local string (diff)
downloadsystemd-aafec74d049483f1fe66cde24d580020734af32c.tar.xz
systemd-aafec74d049483f1fe66cde24d580020734af32c.zip
Merge pull request #12733 from keszybz/sd-bus-error-reporting
Bus error reporting improvements
Diffstat (limited to 'src/network/networkctl.c')
-rw-r--r--src/network/networkctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index a074dae758..b265f1f056 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -222,9 +222,11 @@ static int acquire_link_bitrates(sd_bus *bus, LinkInfo *link) {
"org.freedesktop.network1.Link",
"BitRates");
if (r < 0) {
- if (sd_bus_error_has_name(&error, BUS_ERROR_SPEED_METER_INACTIVE))
- return 0;
- return log_error_errno(r, "%s", bus_error_message(&error, r));
+ bool quiet = sd_bus_error_has_name(&error, SD_BUS_ERROR_UNKNOWN_PROPERTY) ||
+ sd_bus_error_has_name(&error, BUS_ERROR_SPEED_METER_INACTIVE);
+
+ return log_full_errno(quiet ? LOG_DEBUG : LOG_WARNING,
+ r, "Failed to query link bit rates: %s", bus_error_message(&error, r));
}
r = sd_bus_message_enter_container(reply, 'v', "(dd)");