summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-05-08 17:21:37 +0200
committerTom Gundersen <teg@jklm.no>2014-05-08 17:21:37 +0200
commitbbf7c04821a71fec67eaf0e7a34d17afc5913c13 (patch)
treec713e0a13d98e87c2462947c508b025c25dd827c /src/network/networkd-link.c
parente0e5ce237b11f2d97189cd7725bf339b4b8a78de (diff)
sd-network: expose global operational state
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 04b2265610..ab3158356a 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1117,7 +1117,7 @@ static int link_acquire_conf(Link *link) {
return 0;
}
-static bool link_has_carrier(unsigned flags, uint8_t operstate) {
+bool link_has_carrier(unsigned flags, uint8_t operstate) {
/* see Documentation/networking/operstates.txt in the kernel sources */
if (operstate == IF_OPER_UP)
@@ -1689,6 +1689,11 @@ int link_save(Link *link) {
assert(link);
assert(link->state_file);
+ assert(link->manager);
+
+ r = manager_save(link->manager);
+ if (r < 0)
+ return r;
admin_state = link_state_to_string(link->state);
assert(admin_state);
@@ -1735,7 +1740,7 @@ int link_save(Link *link) {
finish:
if (r < 0)
- log_error("Failed to save link data %s: %s", link->state_file, strerror(-r));
+ log_error("Failed to save link data to %s: %s", link->state_file, strerror(-r));
return r;
}