From aa2fe8ccbfcb117efa207d10229eeeac5d0f97c7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 Feb 2023 17:11:30 +0100 Subject: Adding upstream version 1.38.0. Signed-off-by: Daniel Baumann --- collectors/proc.plugin/proc_self_mountinfo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'collectors/proc.plugin/proc_self_mountinfo.c') diff --git a/collectors/proc.plugin/proc_self_mountinfo.c b/collectors/proc.plugin/proc_self_mountinfo.c index 9310f2ffc..0483749c3 100644 --- a/collectors/proc.plugin/proc_self_mountinfo.c +++ b/collectors/proc.plugin/proc_self_mountinfo.c @@ -227,8 +227,9 @@ struct mountinfo *mountinfo_read(int do_statvfs) { struct mountinfo *root = NULL, *last = NULL, *mi = NULL; // create a dictionary to track uniqueness - DICTIONARY *dict = dictionary_create( - DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_NAME_LINK_DONT_CLONE); + DICTIONARY *dict = dictionary_create_advanced( + DICT_OPTION_SINGLE_THREADED | DICT_OPTION_DONT_OVERWRITE_VALUE | DICT_OPTION_NAME_LINK_DONT_CLONE, + &dictionary_stats_category_collectors, 0); unsigned long l, lines = procfile_lines(ff); for(l = 0; l < lines ;l++) { @@ -252,7 +253,7 @@ struct mountinfo *mountinfo_read(int do_statvfs) { for(minor = major; *minor && *minor != ':' ;minor++) ; if(unlikely(!*minor)) { - error("Cannot parse major:minor on '%s' at line %lu of '%s'", major, l + 1, filename); + collector_error("Cannot parse major:minor on '%s' at line %lu of '%s'", major, l + 1, filename); freez(mi); continue; } @@ -442,7 +443,7 @@ struct mountinfo *mountinfo_read(int do_statvfs) { #ifdef NETDATA_INTERNAL_CHECKS if(unlikely(!mi)) { - error("Mount point '%s' not found in /proc/self/mountinfo", mnt->mnt_dir); + collector_error("Mount point '%s' not found in /proc/self/mountinfo", mnt->mnt_dir); } #endif } -- cgit v1.2.3