network: introduce link_send_changed_strv()

It will be used in later commits.
This commit is contained in:
Yu Watanabe
2019-06-16 09:14:40 +09:00
parent 6a1af3d4ca
commit aa3108f6b2
2 changed files with 13 additions and 6 deletions
+12 -6
View File
@@ -145,17 +145,15 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
return 1;
}
int link_send_changed(Link *link, const char *property, ...) {
int link_send_changed_strv(Link *link, char **properties) {
_cleanup_free_ char *p = NULL;
char **l;
assert(link);
assert(link->manager);
assert(properties);
if (!link->manager->bus)
return 0; /* replace with assert when we have kdbus */
l = strv_from_stdarg_alloca(property);
return 0;
p = link_bus_path(link);
if (!p)
@@ -165,5 +163,13 @@ int link_send_changed(Link *link, const char *property, ...) {
link->manager->bus,
p,
"org.freedesktop.network1.Link",
l);
properties);
}
int link_send_changed(Link *link, const char *property, ...) {
char **properties;
properties = strv_from_stdarg_alloca(property);
return link_send_changed_strv(link, properties);
}
+1
View File
@@ -12,4 +12,5 @@ extern const sd_bus_vtable link_vtable[];
char *link_bus_path(Link *link);
int link_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error);
int link_object_find(sd_bus *bus, const char *path, const char *interface, void *userdata, void **found, sd_bus_error *error);
int link_send_changed_strv(Link *link, char **properties);
int link_send_changed(Link *link, const char *property, ...) _sentinel_;