if (cfg_disk == NULL)
return;
+ if (cfg_disk->query != NULL)
+ na_elem_free (cfg_disk->query);
+
free_disk (cfg_disk->disks);
sfree (cfg_disk);
} /* }}} void free_cfg_disk */
+static void free_cfg_system (cfg_system_t *cs) /* {{{ */
+{
+ if (cs == NULL)
+ return;
+
+ if (cs->query != NULL)
+ na_elem_free (cs->query);
+
+ sfree (cs);
+} /* }}} void free_cfg_system */
+
static void free_cfg_service (cfg_service_t *service) /* {{{ */
{
cfg_service_t *next;
free_cfg_service (hc->services);
free_cfg_disk (hc->cfg_disk);
free_cfg_wafl (hc->cfg_wafl);
+ free_cfg_system (hc->cfg_system);
free_volume (hc->volumes);
sfree (hc);
cna_config_bool_to_flag (item, &cfg_disk->flags, CFG_DISK_BUSIEST);
}
+ if ((cfg_disk->flags & CFG_DISK_ALL) == 0)
+ {
+ NOTICE ("netapp plugin: All disk related values have been disabled. "
+ "Collection of per-disk data will be disabled entirely.");
+ free_cfg_disk (host->cfg_disk);
+ host->cfg_disk = NULL;
+ }
+
return (0);
} /* }}} int cna_config_disk */
}
}
+ if ((cfg_system->flags & CFG_SYSTEM_ALL) == 0)
+ {
+ NOTICE ("netapp plugin: All system related values have been disabled. "
+ "Collection of system data will be disabled entirely.");
+ free_cfg_system (host->cfg_system);
+ host->cfg_system = NULL;
+ }
+
return (0);
} /* }}} int cna_config_system */