diff options
author | Heikki Kallasjoki <fis@zem.fi> | 2018-11-30 21:49:29 +0000 |
---|---|---|
committer | Heikki Kallasjoki <fis@zem.fi> | 2018-11-30 21:50:10 +0000 |
commit | 1df8f91af10605e3245774ed4b86254e8d9a1ffe (patch) | |
tree | 483932952a00c047dc5b617746efa13ec537eed5 /filesystem.c | |
parent | cf2969241324d2464bf1121406404cd8c0f6e0bc (diff) | |
download | nano-exporter-1df8f91af10605e3245774ed4b86254e8d9a1ffe.tar.gz nano-exporter-1df8f91af10605e3245774ed4b86254e8d9a1ffe.tar.xz nano-exporter-1df8f91af10605e3245774ed4b86254e8d9a1ffe.zip |
Add support for matching with prefix in include/exclude lists.
Diffstat (limited to 'filesystem.c')
-rw-r--r-- | filesystem.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |