From: Costa Tsaousis Date: Fri, 29 Apr 2016 02:18:20 +0000 (+0300) Subject: Merge pull request #337 from ktsaou/master X-Git-Tag: v1.2.0~36 X-Git-Url: https://arthur.barton.de/gitweb/?p=netdata.git;a=commitdiff_plain;h=77612636a4c605549f911e4a505c77bb707aaf39;hp=fe48fffbb1b509026b3e9220421cd39ecdaa104c Merge pull request #337 from ktsaou/master fixed the commented code in mountinfo; minor fixes for the demo sites --- diff --git a/src/proc_self_mountinfo.c b/src/proc_self_mountinfo.c index ee29e20a..fa407967 100644 --- a/src/proc_self_mountinfo.c +++ b/src/proc_self_mountinfo.c @@ -56,11 +56,10 @@ void mountinfo_free(struct mountinfo *mi) { if(mi->optional_fields_count) { int i; for(i = 0; i < mi->optional_fields_count ; i++) - free(mi->optional_fields[i]); + free(*mi->optional_fields[i]); } free(mi->optional_fields); */ - free(mi->filesystem); free(mi->mount_source); free(mi->super_options); @@ -147,7 +146,7 @@ struct mountinfo *mountinfo_read() { int i; for(i = 0; i < mi->optional_fields_count ; i++) { - mi->optional_fields[wo] = strdup(procfile_lineword(ff, l, w)); + *mi->optional_fields[wo] = strdup(procfile_lineword(ff, l, w)); if(!mi->optional_fields[wo]) fatal("Cannot allocate memory"); wo++; } diff --git a/src/proc_self_mountinfo.h b/src/proc_self_mountinfo.h index d1056095..8c212749 100644 --- a/src/proc_self_mountinfo.h +++ b/src/proc_self_mountinfo.h @@ -19,9 +19,8 @@ struct mountinfo { int optional_fields_count; /* - char *(*optional_fields); // optional fields: zero or more fields of the form "tag[:value]". + char ***optional_fields; // optional fields: zero or more fields of the form "tag[:value]". */ - char *filesystem; // filesystem type: name of filesystem in the form "type[.subtype]". uint32_t filesystem_hash; diff --git a/web/index.html b/web/index.html index d5e0b27d..17b4fca0 100644 --- a/web/index.html +++ b/web/index.html @@ -350,8 +350,9 @@