path-util: introduce path_strv_contains() helper

it's like strv_contains() but uses path_equal() rather than streq() to
compare strings.
This commit is contained in:
Lennart Poettering
2020-01-09 11:17:21 +01:00
parent 125c7814fa
commit 3841fee822
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -181,3 +181,5 @@ bool empty_or_root(const char *root);
static inline const char *empty_to_root(const char *path) {
return isempty(path) ? "/" : path;
}
bool path_strv_contains(char **l, const char *path);