diff options
author | Tom Gundersen <teg@jklm.no> | 2014-05-08 17:21:37 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-05-08 17:21:37 +0200 |
commit | bbf7c04821a71fec67eaf0e7a34d17afc5913c13 (patch) | |
tree | c713e0a13d98e87c2462947c508b025c25dd827c /src/network/networkd-link.c | |
parent | e0e5ce237b11f2d97189cd7725bf339b4b8a78de (diff) |
sd-network: expose global operational state
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r-- | src/network/networkd-link.c | 9 |
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; } |