chiark / gitweb /
networkd-wait-online: support globbing for ignored devices
authorTom Gundersen <teg@jklm.no>
Sun, 1 Feb 2015 14:13:17 +0000 (15:13 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 2 Feb 2015 10:57:52 +0000 (11:57 +0100)
TODO
src/network/networkd-wait-online-manager.c

diff --git a/TODO b/TODO
index e9615cc07115debf0f79f85f0cc5c028b18f247c..1d9ca394c957ec67ab98c5cae7016f9b611505b5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -34,8 +34,6 @@ External:
 
 Features:
 
-* network-wait-online should support globbing for interfaces.
-
 * network-wait-online should have a configurable timeout, maybe as --timeout-usec=
 
 * The udev blkid built-in should expose a property that reflects
index c66470c3e27f275065d8492164b765f174d6f0bd..d1273725f075c835c9765d0681d6717f0eaf8b7a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <netinet/ether.h>
 #include <linux/if.h>
+#include <fnmatch.h>
 
 #include "rtnl-util.h"
 
 #include "util.h"
 
 bool manager_ignore_link(Manager *m, Link *link) {
+        char **ignore;
+
         assert(m);
         assert(link);
 
         if (link->flags & IFF_LOOPBACK)
                 return true;
 
-        if (strv_contains(m->ignore, link->ifname))
-                return true;
+        STRV_FOREACH(ignore, m->ignore)
+                if (fnmatch(*ignore, link->ifname, 0) == 0)
+                        return true;
 
         return false;
 }