if(likely(mi->next))
mountinfo_free(mi->next);
- free(mi->root);
- free(mi->mount_point);
- free(mi->mount_options);
+ if(mi->root) free(mi->root);
+ if(mi->mount_point) free(mi->mount_point);
+ if(mi->mount_options) free(mi->mount_options);
+/*
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);
+*/
free(mi->filesystem);
free(mi->mount_source);
if(unlikely(!mi->mount_options)) fatal("Cannot allocate memory");
// count the optional fields
+/*
unsigned long wo = w;
+*/
mi->optional_fields_count = 0;
char *s = procfile_lineword(ff, l, w);
while(*s && *s != '-') {
mi->optional_fields_count++;
}
+/*
if(unlikely(mi->optional_fields_count)) {
// we have some optional fields
// read them into a new array of pointers;
}
else
mi->optional_fields = NULL;
+*/
if(likely(*s == '-')) {
w++;
char *mount_options; // mount options: per-mount options.
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;