From 1df8f91af10605e3245774ed4b86254e8d9a1ffe Mon Sep 17 00:00:00 2001 From: Heikki Kallasjoki Date: Fri, 30 Nov 2018 21:49:29 +0000 Subject: Add support for matching with prefix in include/exclude lists. --- filesystem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'filesystem.c') diff --git a/filesystem.c b/filesystem.c index ca4e7f6..edb5b42 100644 --- a/filesystem.c +++ b/filesystem.c @@ -117,26 +117,26 @@ static void filesystem_collect(scrape_req *req, void *ctx_ptr) { continue; if (ctx->include_device) { - if (!slist_contains(ctx->include_device, *dev)) + if (!slist_matches(ctx->include_device, *dev)) continue; } else { if (**dev != '/') continue; - if (ctx->exclude_device && slist_contains(ctx->exclude_device, *dev)) + if (ctx->exclude_device && slist_matches(ctx->exclude_device, *dev)) continue; } if (ctx->include_mount) { - if (!slist_contains(ctx->include_mount, *mount)) + if (!slist_matches(ctx->include_mount, *mount)) continue; } else if (ctx->exclude_mount) { - if (slist_contains(ctx->exclude_mount, *mount)) + if (slist_matches(ctx->exclude_mount, *mount)) continue; } if (ctx->include_type) { - if (!slist_contains(ctx->include_type, *fstype)) + if (!slist_matches(ctx->include_type, *fstype)) continue; } else if (ctx->exclude_type) { - if (slist_contains(ctx->exclude_type, *fstype)) + if (slist_matches(ctx->exclude_type, *fstype)) continue; } -- cgit 1.4.1