diff options
Diffstat (limited to 'lib/utils_disk.c')
-rw-r--r-- | lib/utils_disk.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/utils_disk.c b/lib/utils_disk.c index 877b80d..cfd6a97 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c | |||
@@ -155,3 +155,13 @@ np_seen_name(struct name_list *list, const char *name) | |||
155 | return FALSE; | 155 | return FALSE; |
156 | } | 156 | } |
157 | 157 | ||
158 | int | ||
159 | np_regex_match_mount_entry (struct mount_entry* me, regex_t* re) | ||
160 | { | ||
161 | if (regexec(re, me->me_devname, (size_t) 0, NULL, 0) == 0 || | ||
162 | regexec(re, me->me_mountdir, (size_t) 0, NULL, 0) == 0 ) { | ||
163 | return true; | ||
164 | } else { | ||
165 | return false; | ||
166 | } | ||
167 | } | ||