fix simple_pattern_create on freebsd (#14656)
Ilya Mashchenko committed
Mar 3, 2023 at 16:30 UTC
36932b5bf7f58de95a6b140626669cae4accdf30
3 files changed
+20
-22
collectors/freebsd.plugin/freebsd_devstat.c
+4
-4
@@ -222,10 +222,10 @@ int do_kern_devstat(int update_every, usec_t dt) {
222
CONFIG_BOOLEAN_AUTO);
223
224
excluded_disks = simple_pattern_create(
225
- config_get(CONFIG_SECTION_KERN_DEVSTAT, "disable by default disks matching", DEFAULT_EXCLUDED_DISKS)
226
- , NULL
227
- , SIMPLE_PATTERN_EXACT
228
- );
225
+ config_get(CONFIG_SECTION_KERN_DEVSTAT, "disable by default disks matching", DEFAULT_EXCLUDED_DISKS),
226
+ NULL,
227
+ SIMPLE_PATTERN_EXACT,
228
+ true);
229
}
230
231
if (likely(do_system_io || do_io || do_ops || do_qops || do_util || do_iotime || do_await || do_avagsz || do_svctm)) {
collectors/freebsd.plugin/freebsd_getifaddrs.c
+8
-8
@@ -177,15 +177,15 @@ int do_getifaddrs(int update_every, usec_t dt) {
177
CONFIG_BOOLEAN_AUTO);
178
179
excluded_interfaces = simple_pattern_create(
180
- config_get(CONFIG_SECTION_GETIFADDRS, "disable by default interfaces matching", DEFAULT_EXCLUDED_INTERFACES)
181
- , NULL
182
- , SIMPLE_PATTERN_EXACT
183
- );
180
+ config_get(CONFIG_SECTION_GETIFADDRS, "disable by default interfaces matching", DEFAULT_EXCLUDED_INTERFACES),
181
+ NULL,
182
+ SIMPLE_PATTERN_EXACT,
183
+ true);
184
physical_interfaces = simple_pattern_create(
185
- config_get(CONFIG_SECTION_GETIFADDRS, "set physical interfaces for system.net", DEFAULT_PHYSICAL_INTERFACES)
186
- , NULL
187
- , SIMPLE_PATTERN_EXACT
188
- );
185
+ config_get(CONFIG_SECTION_GETIFADDRS, "set physical interfaces for system.net", DEFAULT_PHYSICAL_INTERFACES),
186
+ NULL,
187
+ SIMPLE_PATTERN_EXACT,
188
+ true);
189
}
190
191
if (likely(do_bandwidth_ipv4 || do_bandwidth_ipv6 || do_bandwidth || do_packets || do_errors || do_bandwidth_net || do_packets_net ||
collectors/freebsd.plugin/freebsd_getmntinfo.c
+8
-10
@@ -143,18 +143,16 @@ int do_getmntinfo(int update_every, usec_t dt) {
143
do_inodes = config_get_boolean_ondemand(CONFIG_SECTION_GETMNTINFO, "inodes usage for all disks", CONFIG_BOOLEAN_AUTO);
144
145
excluded_mountpoints = simple_pattern_create(
146
- config_get(CONFIG_SECTION_GETMNTINFO, "exclude space metrics on paths",
147
- DEFAULT_EXCLUDED_PATHS)
148
- , NULL
149
- , SIMPLE_PATTERN_EXACT
150
- );
146
+ config_get(CONFIG_SECTION_GETMNTINFO, "exclude space metrics on paths", DEFAULT_EXCLUDED_PATHS),
147
+ NULL,
148
+ SIMPLE_PATTERN_EXACT,
149
+ true);
150
151
excluded_filesystems = simple_pattern_create(
153
- config_get(CONFIG_SECTION_GETMNTINFO, "exclude space metrics on filesystems",
154
- DEFAULT_EXCLUDED_FILESYSTEMS)
155
- , NULL
156
- , SIMPLE_PATTERN_EXACT
157
- );
152
+ config_get(CONFIG_SECTION_GETMNTINFO, "exclude space metrics on filesystems", DEFAULT_EXCLUDED_FILESYSTEMS),
153
+ NULL,
154
+ SIMPLE_PATTERN_EXACT,
155
+ true);
156
}
157
158
if (likely(do_space || do_inodes)) {