chiark / gitweb /
rtnl: rename rtnl_bus_send_with_reply_and_block() to rtnl_bus_call()
authorTom Gundersen <teg@jklm.no>
Mon, 11 Nov 2013 17:55:34 +0000 (18:55 +0100)
committerTom Gundersen <teg@jklm.no>
Wed, 13 Nov 2013 18:48:44 +0000 (19:48 +0100)
Follow the equivalent rename in sd-bus to stay as similar as possible.

src/libsystemd-rtnl/rtnl-util.c
src/libsystemd-rtnl/sd-rtnl.c
src/libsystemd-rtnl/test-rtnl.c
src/network/networkd-address.c
src/network/networkd-link.c
src/network/networkd-route.c
src/systemd/sd-rtnl.h

index 9707aa04a661496bf5386f0d378439e1392661f3..d40858a63b24fbc5a8d2962bdbca2cb9d52dc227 100644 (file)
@@ -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;
         }
index 8ea11df808d2981dda7c59cedd141e3ed542b035..eb3b01b72572bdbed0fa12e0ae9c50e4f43f986f 100644 (file)
@@ -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) {
index 912cc66ba7d7e30e5e985ea040e2578f4e35a6f1..61345bce4066b03a0bd9b3e74ba942d46d435087 100644 (file)
@@ -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:
index 9a7106e8344b151a0b0c035d81d84dbf2f31723b..e02b1df864abeacba8b495da77bb2dbb5e34ada2 100644 (file)
@@ -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;
index 486d4de2c742b7664f61d2188851ba7845348731..085b8db2f8c69292d23b5c27dd7dfb3ce6638717 100644 (file)
@@ -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;
index 918a1d0191790bf5e6960116d4dc5a16ffdda20c..31586165c2a703dfacb0c67ac3ef7c9e8896fdde 100644 (file)
@@ -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;
index 223f40307d64bf2917a06cccf5c241ed418e1422..2d166c4fb4e9baf733224b1dcf5321522520f73f 100644 (file)
@@ -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,