chiark / gitweb /
sd-network: expose 'unmanaged' as a regular state
authorTom Gundersen <teg@jklm.no>
Thu, 17 Jul 2014 14:49:39 +0000 (16:49 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 17 Jul 2014 20:53:35 +0000 (22:53 +0200)
This is useful to save in the consumer of the lib, unlike ENODATA/EBUSY which
means that the user should wait until a useful state is available.

src/network/sd-network.c
src/systemd/sd-network.h

index 1b7518fd94dbe06c89b4a335da58d8b4467a0df0..50e5d9be1fd63e13f957ec5df17bfb3b74af5139 100644 (file)
@@ -85,9 +85,7 @@ _public_ int sd_network_get_link_state(unsigned index, char **state) {
         else if (!s)
                 return -EIO;
 
-        if (streq(s, "unmanaged"))
-                return -EUNATCH;
-        else if (streq(s, "initializing"))
+        if (streq(s, "initializing"))
                 return -EBUSY;
 
         *state = s;
index 45fd3ce08ea0c93aec6b3b6319d220b4004bf7d4..3f794822283218a04d873b97d2ebb1698b7efdcc 100644 (file)
 _SD_BEGIN_DECLARATIONS;
 
 /* Get state from ifindex.
- * Possible states: failed, configuring, configured
+ * Possible states: failed, configuring, configured, unmanaged
  * Possible return codes:
  *   -ENODATA: networkd is not aware of the link
- *   -EUNATCH: networkd is not managing this link
  *   -EBUSY: udev is still processing the link, networkd does not yet know if it will manage it
  */
 int sd_network_get_link_state(unsigned ifindex, char **state);