summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7658e99)
raw | patch | inline | side by side (parent: 7658e99)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 28 Sep 2009 14:05:55 +0000 (16:05 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Mon, 28 Sep 2009 14:05:55 +0000 (16:05 +0200) |
src/netapp.c | patch | blob | history |
diff --git a/src/netapp.c b/src/netapp.c
index c2ebc9f96efbe202147edfcdcdb5f32299279ca8..55f449b781112210442565cd1a43ab8ed70a1a49 100644 (file)
--- a/src/netapp.c
+++ b/src/netapp.c
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);
@@ -1663,6 +1678,14 @@ static int cna_config_disk(host_config_t *host, oconfig_item_t *ci) { /* {{{ */
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 */