mirror of
https://github.com/systemd/systemd
synced 2024-07-22 10:44:58 +00:00
network: replace usage of sd_bus_call_method_async() to bus_call_method_async() (#24290)
This commit is contained in:
parent
9d9bc6fc57
commit
d277530616
|
@ -4,6 +4,7 @@
|
|||
#include <linux/if_arp.h>
|
||||
|
||||
#include "bus-error.h"
|
||||
#include "bus-locator.h"
|
||||
#include "dhcp-identifier.h"
|
||||
#include "dhcp-internal.h"
|
||||
#include "dhcp6-internal.h"
|
||||
|
@ -187,12 +188,10 @@ int manager_request_product_uuid(Manager *m) {
|
|||
|
||||
m->product_uuid_requested = false;
|
||||
|
||||
r = sd_bus_call_method_async(
|
||||
r = bus_call_method_async(
|
||||
m->bus,
|
||||
NULL,
|
||||
"org.freedesktop.hostname1",
|
||||
"/org/freedesktop/hostname1",
|
||||
"org.freedesktop.hostname1",
|
||||
bus_hostname,
|
||||
"GetProductUUID",
|
||||
get_product_uuid_handler,
|
||||
m,
|
||||
|
|
|
@ -993,12 +993,10 @@ int manager_set_hostname(Manager *m, const char *hostname) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
r = sd_bus_call_method_async(
|
||||
r = bus_call_method_async(
|
||||
m->bus,
|
||||
NULL,
|
||||
"org.freedesktop.hostname1",
|
||||
"/org/freedesktop/hostname1",
|
||||
"org.freedesktop.hostname1",
|
||||
bus_hostname,
|
||||
"SetHostname",
|
||||
set_hostname_handler,
|
||||
m,
|
||||
|
|
|
@ -63,6 +63,12 @@ const BusLocator* const bus_timedate = &(BusLocator){
|
|||
.interface = "org.freedesktop.timedate1"
|
||||
};
|
||||
|
||||
const BusLocator* const bus_hostname = &(BusLocator){
|
||||
.destination = "org.freedesktop.hostname1",
|
||||
.path = "/org/freedesktop/hostname1",
|
||||
.interface = "org.freedesktop.hostname1"
|
||||
};
|
||||
|
||||
/* Shorthand flavors of the sd-bus convenience helpers with destination,path,interface strings encapsulated
|
||||
* within a single struct. */
|
||||
int bus_call_method_async(
|
||||
|
|
|
@ -19,6 +19,7 @@ extern const BusLocator* const bus_portable_mgr;
|
|||
extern const BusLocator* const bus_resolve_mgr;
|
||||
extern const BusLocator* const bus_systemd_mgr;
|
||||
extern const BusLocator* const bus_timedate;
|
||||
extern const BusLocator* const bus_hostname;
|
||||
|
||||
/* Shorthand flavors of the sd-bus convenience helpers with destination,path,interface strings encapsulated
|
||||
* within a single struct. */
|
||||
|
|
Loading…
Reference in a new issue