summaryrefslogtreecommitdiff
path: root/src/network/networkd-wait-online.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-02-28 02:07:29 +0100
committerTom Gundersen <teg@jklm.no>2014-02-28 02:08:08 +0100
commitcb6fa44cb5411ed574f14109ee862ff663ab0a36 (patch)
treeec1e33cf95961e3f61de47caf6a6e8afa2558387 /src/network/networkd-wait-online.c
parent82bdf8ce36ccfe1b6ff389a9c9c7e2b2d049a43d (diff)
downloadsystemd-cb6fa44cb5411ed574f14109ee862ff663ab0a36.tar.gz
sd-network: turn states 'unknown' and 'unmanaged' into errnos
Diffstat (limited to 'src/network/networkd-wait-online.c')
-rw-r--r--src/network/networkd-wait-online.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/network/networkd-wait-online.c b/src/network/networkd-wait-online.c
index 900dc05125..51c6bbd495 100644
--- a/src/network/networkd-wait-online.c
+++ b/src/network/networkd-wait-online.c
@@ -38,20 +38,15 @@ static bool all_configured(void) {
_cleanup_free_ char *state = NULL;
r = sd_network_get_link_state(indices[i], &state);
- if (r < 0)
+ if (r == -EUNATCH)
+ continue;
+ if (r < 0 || !streq(state, "configured"))
return false;
- if (streq(state, "configured"))
- one_ready = true;
-
- if (!streq(state, "configured") && !streq(state, "unmanaged"))
- return false;
+ one_ready = true;
}
- if (one_ready)
- return true;
-
- return false;
+ return one_ready;
}
static int event_handler(sd_event_source *s, int fd, uint32_t revents,