diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index 4acb3c305c..c02b39e0ad 100644 --- a/src/util.c +++ b/src/util.c @@ -4079,6 +4079,19 @@ int kill_and_sigcont(pid_t pid, int sig) { return r; } +bool nulstr_contains(const char*nulstr, const char *needle) { + const char *i; + + if (!nulstr) + return false; + + NULSTR_FOREACH(i, nulstr) + if (streq(i, needle)) + return true; + + return false; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime", |