TypeInstance "/all/"
Title "Diskspace"
+ VerticalLabel "Bytes"
<DEF>
TypeInstance "used"
return (0);
} /* }}} int graph_clear_instances */
+int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst, /* {{{ */
+ str_array_t *args)
+{
+ if ((cfg == NULL) || (inst == NULL) || (args == NULL))
+ return (EINVAL);
+
+ if (cfg->title != NULL)
+ {
+ array_append (args, "-t");
+ array_append (args, cfg->title);
+ }
+
+ if (cfg->vertical_label != NULL)
+ {
+ array_append (args, "-v");
+ array_append (args, cfg->vertical_label);
+ }
+
+ return (0);
+} /* }}} int graph_get_rrdargs */
+
/* vim: set sw=2 sts=2 et fdm=marker : */
#include "graph_ident.h"
#include "graph_instance.h"
#include "oconfig.h"
+#include "utils_array.h"
/*
* Functions
int graph_clear_instances (graph_config_t *cfg);
+int graph_get_rrdargs (graph_config_t *cfg, graph_instance_t *inst,
+ str_array_t *args);
+
#endif /* GRAPH_H */
/* vim: set sw=2 sts=2 et fdm=marker : */
if ((cfg == NULL) || (inst == NULL) || (args == NULL))
return (EINVAL);
-/* FIXME: Re-enable title and vertical label stuff. */
-#if 0
- if (cfg->title != NULL)
- {
- array_append (args, "-t");
- array_append (args, cfg->title);
- }
-
- if (cfg->vertical_label != NULL)
- {
- array_append (args, "-v");
- array_append (args, cfg->vertical_label);
- }
-#endif
+ status = graph_get_rrdargs (cfg, inst, args);
+ if (status != 0)
+ return (status);
defs = graph_get_defs (cfg);
if (defs == NULL)