summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7d88264)
raw | patch | inline | side by side (parent: 7d88264)
author | Florian Forster <ff@octo.it> | |
Tue, 15 Jun 2010 09:35:09 +0000 (11:35 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 15 Jun 2010 09:35:09 +0000 (11:35 +0200) |
action_graph.c | patch | blob | history | |
graph.c | patch | blob | history | |
graph.h | patch | blob | history | |
graph_def.c | patch | blob | history | |
graph_instance.c | patch | blob | history | |
graph_list.c | patch | blob | history | |
graph_list.h | patch | blob | history |
diff --git a/action_graph.c b/action_graph.c
index b565182d835196fca72747f296228a03e902eec4..a0f257e47b4d168571c02d0e8f2660af39194d67 100644 (file)
--- a/action_graph.c
+++ b/action_graph.c
rrd_info_t *info;
int status;
- cfg = graph_get_selected ();
+ cfg = gl_graph_get_selected ();
if (cfg == NULL)
- OUTPUT_ERROR ("graph_get_selected () failed.\n");
+ OUTPUT_ERROR ("gl_graph_get_selected () failed.\n");
inst = inst_get_selected (cfg);
if (inst == NULL)
index 025a8670f11f2c19fa1f0c980a9fe136b73e1e01..c09248297c3bfbbad7ae381590a256287133e37f 100644 (file)
--- a/graph.c
+++ b/graph.c
return (0);
} /* }}} int gl_graph_get_title */
-graph_ident_t *gl_graph_get_selector (graph_config_t *cfg) /* {{{ */
+graph_ident_t *graph_get_selector (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (ident_clone (cfg->select));
-} /* }}} graph_ident_t *gl_graph_get_selector */
+} /* }}} graph_ident_t *graph_get_selector */
-graph_instance_t *gl_graph_get_instances (graph_config_t *cfg) /* {{{ */
+graph_instance_t *graph_get_instances (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (cfg->instances);
-} /* }}} graph_instance_t *gl_graph_get_instances */
+} /* }}} graph_instance_t *graph_get_instances */
-graph_def_t *gl_graph_get_defs (graph_config_t *cfg) /* {{{ */
+graph_def_t *graph_get_defs (graph_config_t *cfg) /* {{{ */
{
if (cfg == NULL)
return (NULL);
return (cfg->defs);
-} /* }}} graph_def_t *gl_graph_get_defs */
+} /* }}} graph_def_t *graph_get_defs */
-int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
+int graph_add_def (graph_config_t *cfg, graph_def_t *def) /* {{{ */
{
if ((cfg == NULL) || (def == NULL))
return (EINVAL);
}
return (def_append (cfg->defs, def));
-} /* }}} int gl_graph_add_def */
+} /* }}} int graph_add_def */
_Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident) /* {{{ */
{
index f7c12e4d261337d7b3fe9aae53af21ae414d6d3f..25da1e0184cf52060b5018655ca50e4ca87c00d0 100644 (file)
--- a/graph.h
+++ b/graph.h
int graph_add_file (graph_config_t *cfg, const graph_ident_t *file);
-int gl_graph_get_title (graph_config_t *cfg,
+int graph_get_title (graph_config_t *cfg,
char *buffer, size_t buffer_size);
-graph_ident_t *gl_graph_get_selector (graph_config_t *cfg);
+graph_ident_t *graph_get_selector (graph_config_t *cfg);
-graph_instance_t *gl_graph_get_instances (graph_config_t *cfg);
+graph_instance_t *graph_get_instances (graph_config_t *cfg);
-graph_def_t *gl_graph_get_defs (graph_config_t *cfg);
+graph_def_t *graph_get_defs (graph_config_t *cfg);
-int gl_graph_add_def (graph_config_t *cfg, graph_def_t *def);
+int graph_add_def (graph_config_t *cfg, graph_def_t *def);
_Bool graph_matches (graph_config_t *cfg, const graph_ident_t *ident);
diff --git a/graph_def.c b/graph_def.c
index 4f918206c713023253f3676a01ded39cb2c620b7..a5511f6fbb742bc38f9a725785fd8a859b61b13a 100644 (file)
--- a/graph_def.c
+++ b/graph_def.c
graph_def_t *def;
int i;
- ident = gl_graph_get_selector (cfg);
+ ident = graph_get_selector (cfg);
if (ident == NULL)
{
- fprintf (stderr, "def_config_get_obj: gl_graph_get_selector failed");
+ fprintf (stderr, "def_config_get_obj: graph_get_selector failed");
return (NULL);
}
if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL))
return (NULL);
- selector = gl_graph_get_selector (cfg);
+ selector = graph_get_selector (cfg);
if (selector == NULL)
return (NULL);
child->key);
}
- return (gl_graph_add_def (cfg, def));
+ return (graph_add_def (cfg, def));
} /* }}} int def_config */
int def_append (graph_def_t *head, graph_def_t *def) /* {{{ */
diff --git a/graph_instance.c b/graph_instance.c
index 5273ef308c0c18b39ef724230ae9bbe923c868c0..25a24a41dbd701a8772d4a682024053f0be2cd49 100644 (file)
--- a/graph_instance.c
+++ b/graph_instance.c
return (NULL);
memset (i, 0, sizeof (*i));
- selector = gl_graph_get_selector (cfg);
+ selector = graph_get_selector (cfg);
if (selector == NULL)
{
- fprintf (stderr, "inst_create: gl_graph_get_selector failed\n");
+ fprintf (stderr, "inst_create: graph_get_selector failed\n");
free (i);
return (NULL);
}
graph_instance_t *inst;
if (cfg == NULL)
- cfg = graph_get_selected ();
+ cfg = gl_graph_get_selected ();
if (cfg == NULL)
{
ident = ident_create (host, plugin, plugin_instance, type, type_instance);
- for (inst = gl_graph_get_instances (cfg); inst != NULL; inst = inst->next)
+ for (inst = graph_get_instances (cfg); inst != NULL; inst = inst->next)
{
if (ident_compare (ident, inst->select) != 0)
continue;
}
#endif
- defs = gl_graph_get_defs (cfg);
+ defs = graph_get_defs (cfg);
if (defs == NULL)
{
defs = inst_get_default_defs (cfg, inst);
|| (buffer == NULL) || (buffer_size < 1))
return (EINVAL);
- cfg_select = gl_graph_get_selector (cfg);
+ cfg_select = graph_get_selector (cfg);
if (cfg_select == NULL)
{
- fprintf (stderr, "inst_get_params: gl_graph_get_selector failed");
+ fprintf (stderr, "inst_get_params: graph_get_selector failed");
return (-1);
}
diff --git a/graph_list.c b/graph_list.c
index 83c5e68012ee85083a4bd965c5da0d4d5533729e..f59508d963ce775ac66d6b02a9adf9da5e235435 100644 (file)
--- a/graph_list.c
+++ b/graph_list.c
return (0);
} /* }}} int gl_graph_get_all */
-graph_config_t *graph_get_selected (void) /* {{{ */
+graph_config_t *gl_graph_get_selected (void) /* {{{ */
{
const char *host = get_part_from_param ("graph_host", "host");
const char *plugin = get_part_from_param ("graph_plugin", "plugin");
ident_destroy (ident);
return (NULL);
-} /* }}} graph_config_t *graph_get_selected */
+} /* }}} graph_config_t *gl_graph_get_selected */
/* gl_instance_get_all, gl_graph_instance_get_all {{{ */
struct gl_inst_callback_data /* {{{ */
if ((cfg == NULL) || (callback == NULL))
return (EINVAL);
- return (inst_foreach (gl_graph_get_instances (cfg),
+ return (inst_foreach (graph_get_instances (cfg),
gl_inst_callback_handler, &data));
} /* }}} int gl_graph_instance_get_all */
diff --git a/graph_list.h b/graph_list.h
index 979c13d763564046672e5bd3b1639d116716227d..8f21e86d8e7b037503b2a597966a2df9a65e0c0d 100644 (file)
--- a/graph_list.h
+++ b/graph_list.h
int gl_graph_get_all (gl_cfg_callback callback,
void *user_data);
-graph_config_t *graph_get_selected (void);
+graph_config_t *gl_graph_get_selected (void);
int gl_graph_instance_get_all (graph_config_t *cfg,
gl_inst_callback callback, void *user_data);