]>
Commit | Line | Data |
---|---|---|
6f248ce1 TL |
1 | #define _GNU_SOURCE |
2 | ||
3 | #include <strings.h> | |
4 | #include <err.h> | |
5 | #include <fnmatch.h> | |
6 | ||
7 | #include "archcommon.h" | |
8 | ||
9 | bool variable_match(const char *iface, const char *variable, const char *pattern) { | |
10 | if (!strcasecmp(variable, "name")) | |
11 | return fnmatch(pattern, iface, FNM_EXTMATCH) == 0; | |
12 | ||
13 | warnx("Unknown or unsupport pattern variable %s", variable); | |
14 | return false; | |
15 | } |