summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd-rtnl/rtnl-util.c4
-rw-r--r--src/libsystemd-rtnl/sd-rtnl.c2
-rw-r--r--src/libsystemd-rtnl/test-rtnl.c8
-rw-r--r--src/network/networkd-address.c2
-rw-r--r--src/network/networkd-link.c2
-rw-r--r--src/network/networkd-route.c2
-rw-r--r--src/systemd/sd-rtnl.h3
7 files changed, 12 insertions, 11 deletions
diff --git a/src/libsystemd-rtnl/rtnl-util.c b/src/libsystemd-rtnl/rtnl-util.c
index 9707aa04a6..d40858a63b 100644
--- a/src/libsystemd-rtnl/rtnl-util.c
+++ b/src/libsystemd-rtnl/rtnl-util.c
@@ -42,7 +42,7 @@ int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name) {
if (r < 0)
return r;
- r = sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL);
+ r = sd_rtnl_call(rtnl, message, 0, NULL);
if (r < 0)
return r;
@@ -81,7 +81,7 @@ int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const struct ether_addr
}
if (need_update) {
- r = sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL);
+ r = sd_rtnl_call(rtnl, message, 0, NULL);
if (r < 0)
return r;
}
diff --git a/src/libsystemd-rtnl/sd-rtnl.c b/src/libsystemd-rtnl/sd-rtnl.c
index 8ea11df808..eb3b01b725 100644
--- a/src/libsystemd-rtnl/sd-rtnl.c
+++ b/src/libsystemd-rtnl/sd-rtnl.c
@@ -107,7 +107,7 @@ sd_rtnl *sd_rtnl_unref(sd_rtnl *rtnl) {
return NULL;
}
-int sd_rtnl_send_with_reply_and_block(sd_rtnl *nl,
+int sd_rtnl_call(sd_rtnl *nl,
sd_rtnl_message *message,
uint64_t usec,
sd_rtnl_message **ret) {
diff --git a/src/libsystemd-rtnl/test-rtnl.c b/src/libsystemd-rtnl/test-rtnl.c
index 912cc66ba7..61345bce40 100644
--- a/src/libsystemd-rtnl/test-rtnl.c
+++ b/src/libsystemd-rtnl/test-rtnl.c
@@ -53,7 +53,7 @@ static void test_link_configure(sd_rtnl *rtnl, int ifindex) {
assert(type == IFLA_MTU);
assert(mtu == *(unsigned int *) data);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, message, 0, NULL) == 0);
+ assert(sd_rtnl_call(rtnl, message, 0, NULL) == 0);
}
static void test_route(void) {
@@ -133,14 +133,14 @@ int main(void) {
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, 0, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, 0, &r) >= 0);
assert(sd_rtnl_message_get_type(r, &type) >= 0);
assert(type == RTM_NEWLINK);
assert(sd_rtnl_message_read(m, &type, &data) == 0);
assert((r = sd_rtnl_message_unref(r)) == NULL);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, -1, &r) == -EPERM);
+ assert(sd_rtnl_call(rtnl, m, -1, &r) == -EPERM);
assert((m = sd_rtnl_message_unref(m)) == NULL);
assert((r = sd_rtnl_message_unref(r)) == NULL);
@@ -155,7 +155,7 @@ int main(void) {
assert(sd_rtnl_message_read(m, &type, &data) == 0);
- assert(sd_rtnl_send_with_reply_and_block(rtnl, m, -1, &r) >= 0);
+ assert(sd_rtnl_call(rtnl, m, -1, &r) >= 0);
while (sd_rtnl_message_read(r, &type, &data) > 0) {
switch (type) {
// case IFLA_MTU:
diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c
index 9a7106e834..e02b1df864 100644
--- a/src/network/networkd-address.c
+++ b/src/network/networkd-address.c
@@ -98,7 +98,7 @@ int address_configure(Manager *manager, Address *address, Link *link) {
}
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not configure address: %s", strerror(-r));
return r != -EEXIST ? r : 0;
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 486d4de2c7..085b8db2f8 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -107,7 +107,7 @@ int link_up(Manager *manager, Link *link) {
return r;
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not UP link: %s", strerror(-r));
return r;
diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c
index 918a1d0191..31586165c2 100644
--- a/src/network/networkd-route.c
+++ b/src/network/networkd-route.c
@@ -83,7 +83,7 @@ int route_configure(Manager *manager, Route *route, Link *link) {
return r;
}
- r = sd_rtnl_send_with_reply_and_block(manager->rtnl, req, 0, NULL);
+ r = sd_rtnl_call(manager->rtnl, req, 0, NULL);
if (r < 0) {
log_error("Could not configure route: %s", strerror(-r));
return r;
diff --git a/src/systemd/sd-rtnl.h b/src/systemd/sd-rtnl.h
index 223f40307d..2d166c4fb4 100644
--- a/src/systemd/sd-rtnl.h
+++ b/src/systemd/sd-rtnl.h
@@ -37,7 +37,8 @@ int sd_rtnl_open(uint32_t groups, sd_rtnl **nl);
sd_rtnl *sd_rtnl_ref(sd_rtnl *nl);
sd_rtnl *sd_rtnl_unref(sd_rtnl *nl);
-int sd_rtnl_send_with_reply_and_block(sd_rtnl *nl, sd_rtnl_message *message, uint64_t timeout, sd_rtnl_message **reply);
+int sd_rtnl_call(sd_rtnl *nl, sd_rtnl_message *message, uint64_t timeout,
+ sd_rtnl_message **reply);
/* messages */
int sd_rtnl_message_link_new(uint16_t msg_type, int index, unsigned int type,