diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-04 10:41:47 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-04 11:00:54 +0100 |
commit | 10a7340a97f383e72a0a58e06bfbd673f347f095 (patch) | |
tree | e3a0363d0318d12ef727935a3fcc5b6023d9f53f /src/busctl/busctl.c | |
parent | fb293b3c0f2f0e24d088a6ccaf3bd051301754af (diff) | |
download | systemd-10a7340a97f383e72a0a58e06bfbd673f347f095.tar.gz |
tree-wide: do not print hint about -M if -M is already used
(Or when -H is used, since -H and -M are incompatible.)
Note that the slightly unusual form with separate boolean variables (hint_vars,
hint_addr) instead of e.g. a const char* variable to hold the message, because this
way we don't trigger the warning about non-literal format.
Diffstat (limited to 'src/busctl/busctl.c')
-rw-r--r-- | src/busctl/busctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 2dbef89e4c..b5cd9749cc 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -102,7 +102,7 @@ static int acquire_bus(bool set_monitor, sd_bus **ret) { if (arg_address) r = sd_bus_set_address(bus, arg_address); - else { + else switch (arg_transport) { case BUS_TRANSPORT_LOCAL: @@ -123,13 +123,13 @@ static int acquire_bus(bool set_monitor, sd_bus **ret) { default: assert_not_reached(); } - } + if (r < 0) return bus_log_address_error(r, arg_transport); r = sd_bus_start(bus); if (r < 0) - return bus_log_connect_error(r); + return bus_log_connect_error(r, arg_transport); *ret = TAKE_PTR(bus); |