assert(prop);
assert(color);
- match_patterns = strv_fnmatch(patterns, u->id, 0);
+ match_patterns = strv_fnmatch(patterns, u->id);
- if (!strv_isempty(from_patterns) && !match_patterns && !strv_fnmatch(from_patterns, u->id, 0))
+ if (!strv_isempty(from_patterns) && !match_patterns && !strv_fnmatch(from_patterns, u->id))
return 0;
r = bus_get_unit_property_strv(bus, u->unit_path, prop, &units);
STRV_FOREACH(unit, units) {
bool match_patterns2;
- match_patterns2 = strv_fnmatch(patterns, *unit, 0);
+ match_patterns2 = strv_fnmatch(patterns, *unit);
- if (!strv_isempty(to_patterns) && !match_patterns2 && !strv_fnmatch(to_patterns, *unit, 0))
+ if (!strv_isempty(to_patterns) && !match_patterns2 && !strv_fnmatch(to_patterns, *unit))
continue;
if (!strv_isempty(patterns) && !match_patterns && !match_patterns2)
char **strv_shell_escape(char **l, const char *bad);
bool strv_fnmatch_full(char* const* patterns, const char *s, int flags, size_t *matched_pos);
-static inline bool strv_fnmatch(char* const* patterns, const char *s, int flags) {
- return strv_fnmatch_full(patterns, s, flags, NULL);
+static inline bool strv_fnmatch(char* const* patterns, const char *s) {
+ return strv_fnmatch_full(patterns, s, 0, NULL);
}
static inline bool strv_fnmatch_or_empty(char* const* patterns, const char *s, int flags) {
assert(s);
return strv_isempty(patterns) ||
- strv_fnmatch(patterns, s, flags);
+ strv_fnmatch_full(patterns, s, flags, NULL);
}
char ***strv_free_free(char ***l);
if (strv_isempty(carrier->network->bind_carrier))
continue;
- if (strv_fnmatch(carrier->network->bind_carrier, link->ifname, 0)) {
+ if (strv_fnmatch(carrier->network->bind_carrier, link->ifname)) {
r = link_put_carrier(link, carrier, &link->bound_by_links);
if (r < 0)
return r;
m = link->manager;
HASHMAP_FOREACH (carrier, m->links, i) {
- if (strv_fnmatch(link->network->bind_carrier, carrier->ifname, 0)) {
+ if (strv_fnmatch(link->network->bind_carrier, carrier->ifname)) {
r = link_put_carrier(link, carrier, &link->bound_to_links);
if (r < 0)
return r;
return true;
/* ignore interfaces we explicitly are asked to ignore */
- return strv_fnmatch(m->ignore, link->ifname, 0);
+ return strv_fnmatch(m->ignore, link->ifname);
}
static int manager_link_is_online(Manager *m, Link *l, LinkOperationalState s) {
log_info("/* %s */", __func__);
- assert_se(!strv_fnmatch(STRV_MAKE_EMPTY, "a", 0));
+ assert_se(!strv_fnmatch(STRV_MAKE_EMPTY, "a"));
v = strv_new("xxx", "*\\*", "yyy");
assert_se(!strv_fnmatch_full(v, "\\", 0, NULL));