summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-13 15:34:27 +0200
committerTom Gundersen <teg@jklm.no>2014-08-13 15:39:57 +0200
commit8434fd5cf23f998a0f3a0f947a4308a8c18ba7a5 (patch)
treed2efcdb8f500b3358b744e7319880f79fff9e47b /src/network
parent90ab504273a7f186ebb76e6acfb778b4e0d7c91b (diff)
sd-network: rename state INITALIZING to PENDING and expose as any other state
This is the state when we are waiting for udev to initialize the device, and waiting for libudev and rtnl to be in sync. In the future we probably will also be waiting for nl80211. At this point we do not yet have enough information to know whether or not networkd should be handling the device.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c14
-rw-r--r--src/network/networkd-link.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 6a5fe59d49..398e8baac9 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -67,7 +67,7 @@ static int link_new(Manager *manager, sd_rtnl_message *message, Link **ret) {
link->n_ref = 1;
link->manager = manager;
- link->state = LINK_STATE_INITIALIZING;
+ link->state = LINK_STATE_PENDING;
link->ifindex = ifindex;
link->ifname = strdup(ifname);
if (!link->ifname)
@@ -1106,7 +1106,7 @@ static int link_enter_join_netdev(Link *link) {
assert(link);
assert(link->network);
- assert(link->state == LINK_STATE_INITIALIZING);
+ assert(link->state == LINK_STATE_PENDING);
link->state = LINK_STATE_ENSLAVING;
@@ -1196,7 +1196,7 @@ static int link_configure(Link *link) {
assert(link);
assert(link->network);
- assert(link->state == LINK_STATE_INITIALIZING);
+ assert(link->state == LINK_STATE_PENDING);
if (link->network->ipv4ll) {
r = ipv4ll_configure(link);
@@ -1265,7 +1265,7 @@ static int link_initialized_and_synced(sd_rtnl *rtnl, sd_rtnl_message *m,
assert(link->ifname);
assert(link->manager);
- if (link->state != LINK_STATE_INITIALIZING)
+ if (link->state != LINK_STATE_PENDING)
return 1;
log_debug_link(link, "link state is up-to-date");
@@ -1298,7 +1298,7 @@ int link_initialized(Link *link, struct udev_device *device) {
assert(link->manager->rtnl);
assert(device);
- if (link->state != LINK_STATE_INITIALIZING)
+ if (link->state != LINK_STATE_PENDING)
return 0;
if (link->udev_device)
@@ -1509,7 +1509,7 @@ int link_add(Manager *m, sd_rtnl_message *message, Link **ret) {
if (udev_device_get_is_initialized(device) <= 0) {
/* not yet ready */
- log_debug_link(link, "udev initializing link...");
+ log_debug_link(link, "link pending udev initialization...");
return 0;
}
@@ -1780,7 +1780,7 @@ fail:
}
static const char* const link_state_table[_LINK_STATE_MAX] = {
- [LINK_STATE_INITIALIZING] = "initializing",
+ [LINK_STATE_PENDING] = "pending",
[LINK_STATE_ENSLAVING] = "configuring",
[LINK_STATE_SETTING_ADDRESSES] = "configuring",
[LINK_STATE_SETTING_ROUTES] = "configuring",
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 144c7c403f..6d58fa1584 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -24,7 +24,7 @@
#include "networkd.h"
typedef enum LinkState {
- LINK_STATE_INITIALIZING,
+ LINK_STATE_PENDING,
LINK_STATE_ENSLAVING,
LINK_STATE_SETTING_ADDRESSES,
LINK_STATE_SETTING_ROUTES,