diff options
author | David Tardon <dtardon@redhat.com> | 2023-05-23 20:37:27 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2023-05-24 08:33:22 +0200 |
commit | 7f8a85e6d89481c44dec193025b88e5beddcb611 (patch) | |
tree | da0a960e5a146c7eb752b5aa1032fbe6bef58d70 | |
parent | journalctl: convert a machine1.Manager call to BusLocator (diff) | |
download | systemd-7f8a85e6d89481c44dec193025b88e5beddcb611.tar.xz systemd-7f8a85e6d89481c44dec193025b88e5beddcb611.zip |
tree-wide: convert more resolve1.Manager calls to BusLocator
-rw-r--r-- | src/nspawn/nspawn.c | 9 | ||||
-rw-r--r-- | src/resolve/test-dnssec-complex.c | 17 |
2 files changed, 5 insertions, 21 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 5d49e05064..74b15dcb44 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -30,6 +30,7 @@ #include "btrfs-util.h" #include "build.h" #include "bus-error.h" +#include "bus-locator.h" #include "bus-util.h" #include "cap-list.h" #include "capability-util.h" @@ -2092,13 +2093,7 @@ static int resolved_listening(void) { if (r == 0) return 0; - r = sd_bus_get_property_string(bus, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "DNSStubListener", - &error, - &dns_stub_listener_mode); + r = bus_get_property_string(bus, bus_resolve_mgr, "DNSStubListener", &error, &dns_stub_listener_mode); if (r < 0) return log_debug_errno(r, "Failed to query DNSStubListener property: %s", bus_error_message(&error, r)); diff --git a/src/resolve/test-dnssec-complex.c b/src/resolve/test-dnssec-complex.c index d8aeb7061f..976d197bb4 100644 --- a/src/resolve/test-dnssec-complex.c +++ b/src/resolve/test-dnssec-complex.c @@ -7,6 +7,7 @@ #include "af-list.h" #include "alloc-util.h" #include "bus-common-errors.h" +#include "bus-locator.h" #include "dns-type.h" #include "random-util.h" #include "resolved-def.h" @@ -46,13 +47,7 @@ static void test_rr_lookup(sd_bus *bus, const char *name, uint16_t type, const c name = m; } - assert_se(sd_bus_message_new_method_call( - bus, - &req, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "ResolveRecord") >= 0); + assert_se(bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveRecord") >= 0); assert_se(sd_bus_message_append(req, "isqqt", 0, name, DNS_CLASS_IN, type, UINT64_C(0)) >= 0); @@ -83,13 +78,7 @@ static void test_hostname_lookup(sd_bus *bus, const char *name, int family, cons name = m; } - assert_se(sd_bus_message_new_method_call( - bus, - &req, - "org.freedesktop.resolve1", - "/org/freedesktop/resolve1", - "org.freedesktop.resolve1.Manager", - "ResolveHostname") >= 0); + assert_se(bus_message_new_method_call(bus, &req, bus_resolve_mgr, "ResolveHostname") >= 0); assert_se(sd_bus_message_append(req, "isit", 0, name, family, UINT64_C(0)) >= 0); |