diff options
author | Tom Gundersen <teg@jklm.no> | 2014-07-05 14:53:54 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-07-14 16:47:04 +0200 |
commit | 3f2650377631aed3bc26fdbc3a2eef6e33cdf7e7 (patch) | |
tree | 29ade8c7586393e652acf2b8e95c525fb0936876 /src/network/networkd-link.c | |
parent | 7c1cff4ff79f3121189403a8c1b7c350925b3aaa (diff) |
networkd: netdev - rename 'enslave' to 'join'
Enslave only really makes sense when referring to bridges and bonds, so try to be
a bit more neutral.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 9e057ce0ff..ccf818115b 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1732,14 +1732,14 @@ static int link_up(Link *link) { return 0; } -static int link_enslaved(Link *link) { +static int link_joined(Link *link) { int r; assert(link); assert(link->state == LINK_STATE_ENSLAVING); assert(link->network); - log_debug_link(link, "enslaved"); + log_debug_link(link, "joined netdev"); if (!(link->flags & IFF_UP)) { r = link_up(link); @@ -1752,7 +1752,7 @@ static int link_enslaved(Link *link) { return link_enter_set_addresses(link); } -static int enslave_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { +static int netdev_join_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { _cleanup_link_unref_ Link *link = userdata; int r; @@ -1769,7 +1769,7 @@ static int enslave_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { r = sd_rtnl_message_get_errno(m); if (r < 0 && r != -EEXIST) { log_struct_link(LOG_ERR, link, - "MESSAGE=%-*s: could not enslave: %s", + "MESSAGE=%-*s: could not join netdev: %s", IFNAMSIZ, link->ifname, strerror(-r), "ERRNO=%d", -r, @@ -1779,12 +1779,12 @@ static int enslave_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { } if (link->enslaving <= 0) - link_enslaved(link); + link_joined(link); return 1; } -static int link_enter_enslave(Link *link) { +static int link_enter_join_netdev(Link *link) { NetDev *vlan, *macvlan, *vxlan; Iterator i; int r; @@ -1803,7 +1803,7 @@ static int link_enter_enslave(Link *link) { hashmap_isempty(link->network->vlans) && hashmap_isempty(link->network->macvlans) && hashmap_isempty(link->network->vxlans)) - return link_enslaved(link); + return link_joined(link); if (link->network->bond) { log_struct_link(LOG_DEBUG, link, @@ -1813,10 +1813,10 @@ static int link_enter_enslave(Link *link) { NETDEV(link->network->bond), NULL); - r = netdev_enslave(link->network->bond, link, &enslave_handler); + r = netdev_join(link->network->bond, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%-*s: could not enslave by '%s': %s", + "MESSAGE=%-*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, link->network->bond->ifname, strerror(-r), NETDEV(link->network->bond), @@ -1836,10 +1836,10 @@ static int link_enter_enslave(Link *link) { NETDEV(link->network->bridge), NULL); - r = netdev_enslave(link->network->bridge, link, &enslave_handler); + r = netdev_join(link->network->bridge, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%-*s: could not enslave by '%s': %s", + "MESSAGE=%-*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, link->network->bridge->ifname, strerror(-r), NETDEV(link->network->bridge), @@ -1859,10 +1859,10 @@ static int link_enter_enslave(Link *link) { NETDEV(link->network->tunnel), NULL); - r = netdev_enslave(link->network->tunnel, link, &enslave_handler); + r = netdev_join(link->network->tunnel, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%-*s: could not enslave by '%s': %s", + "MESSAGE=%-*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, link->network->tunnel->ifname, strerror(-r), NETDEV(link->network->tunnel), @@ -1880,10 +1880,10 @@ static int link_enter_enslave(Link *link) { IFNAMSIZ, link->ifname, vlan->ifname, NETDEV(vlan), NULL); - r = netdev_enslave(vlan, link, &enslave_handler); + r = netdev_join(vlan, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%-*s: could not enslave by '%s': %s", + "MESSAGE=%-*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, vlan->ifname, strerror(-r), NETDEV(vlan), NULL); @@ -1900,10 +1900,10 @@ static int link_enter_enslave(Link *link) { IFNAMSIZ, link->ifname, macvlan->ifname, NETDEV(macvlan), NULL); - r = netdev_enslave(macvlan, link, &enslave_handler); + r = netdev_join(macvlan, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%-*s: could not enslave by '%s': %s", + "MESSAGE=%-*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, macvlan->ifname, strerror(-r), NETDEV(macvlan), NULL); @@ -1920,10 +1920,10 @@ static int link_enter_enslave(Link *link) { IFNAMSIZ, link->ifname, vxlan->ifname, NETDEV(vxlan), NULL); - r = netdev_enslave(vxlan, link, &enslave_handler); + r = netdev_join(vxlan, link, &netdev_join_handler); if (r < 0) { log_struct_link(LOG_WARNING, link, - "MESSAGE=%*s: could not enslave by '%s': %s", + "MESSAGE=%*s: could not join netdev '%s': %s", IFNAMSIZ, link->ifname, vxlan->ifname, strerror(-r), NETDEV(vxlan), NULL); @@ -2074,7 +2074,7 @@ static int link_configure(Link *link) { return r; } - return link_enter_enslave(link); + return link_enter_join_netdev(link); } static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { |