summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: beb1cb5)
raw | patch | inline | side by side (parent: beb1cb5)
author | Florian Forster <ff@octo.it> | |
Tue, 15 Jun 2010 11:24:00 +0000 (13:24 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 15 Jun 2010 11:24:00 +0000 (13:24 +0200) |
action_list_graphs.c | patch | blob | history | |
filesystem.c | patch | blob | history | |
filesystem.h | patch | blob | history | |
graph.c | patch | blob | history | |
graph_config.c | patch | blob | history | |
graph_ident.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_list_graphs.c b/action_list_graphs.c
index fc4ec14e31501227277f76da8be362300ec7e9a3..4ec9a30948d7c9f9e87644d20b3ac3c4de9a58c1 100644 (file)
--- a/action_list_graphs.c
+++ b/action_list_graphs.c
#include <errno.h>
#include "action_list_graphs.h"
+#include "graph.h"
#include "graph_list.h"
#include "utils_params.h"
char buffer[1024];
memset (buffer, 0, sizeof (buffer));
- gl_graph_get_title (cfg, buffer, sizeof (buffer));
+ graph_get_title (cfg, buffer, sizeof (buffer));
printf ("<li>%s\n<ul>\n", buffer);
gl_graph_instance_get_all (cfg, print_graph_inst_html, /* user_data = */ NULL);
diff --git a/filesystem.c b/filesystem.c
index ba57249b1ea09408b151dd94cb1d2cc4788c2e9a..a5eeb81f73771fe4c63979e5bf574b3bad5a74fa 100644 (file)
--- a/filesystem.c
+++ b/filesystem.c
#include <sys/stat.h>
#include <dirent.h>
-#define DATA_DIR "/var/lib/collectd/rrd"
-
#include "filesystem.h"
struct fs_scan_dir_data_s /* {{{ */
{
DIR *dh;
struct dirent *entry;
- int status;
+ int status = 0;
if (callback == NULL)
return (EINVAL);
diff --git a/filesystem.h b/filesystem.h
index 49798a00c7b485494f669d6a33136c343455c4ee..9569bc3d337b0d1abf2674762efd34542c8621b3 100644 (file)
--- a/filesystem.h
+++ b/filesystem.h
#include "graph_ident.h"
+#define DATA_DIR "/var/lib/collectd/rrd"
+
typedef int (*fs_ident_cb_t) (const graph_ident_t *ident, void *user_data);
int fs_scan (fs_ident_cb_t callback, void *user_data);
index c09248297c3bfbbad7ae381590a256287133e37f..79964f3b5b25ffb7d866fc53ea269699a6432ed5 100644 (file)
--- a/graph.c
+++ b/graph.c
return (inst_add_file (inst, file));
} /* }}} int graph_add_file */
-int gl_graph_get_title (graph_config_t *cfg, /* {{{ */
+int graph_get_title (graph_config_t *cfg, /* {{{ */
char *buffer, size_t buffer_size)
{
if ((cfg == NULL) || (buffer == NULL) || (buffer_size < 1))
buffer[buffer_size - 1] = 0;
return (0);
-} /* }}} int gl_graph_get_title */
+} /* }}} int graph_get_title */
graph_ident_t *graph_get_selector (graph_config_t *cfg) /* {{{ */
{
diff --git a/graph_config.c b/graph_config.c
index 1b612c6a3b14db16e5e1062ee014e5125d50308d..94dd440edc75d25a9242b6cfc4d0f511ecee2549 100644 (file)
--- a/graph_config.c
+++ b/graph_config.c
oconfig_free (ci);
- graph_config_submit ();
+ gl_config_submit ();
return (0);
} /* }}} int internal_read_config */
diff --git a/graph_ident.c b/graph_ident.c
index fb6e206f46c01eb8856cfad5c9fbba76ce634064..454cc1a1cd9141e3dee50f715663416eff2347e2 100644 (file)
--- a/graph_ident.c
+++ b/graph_ident.c
#include "graph_ident.h"
#include "common.h"
+#include "filesystem.h"
#define IS_ANY(str) (((str) != NULL) && (strcasecmp (ANY_TOKEN, (str)) == 0))
#define IS_ALL(str) (((str) != NULL) && (strcasecmp (ALL_TOKEN, (str)) == 0))
diff --git a/graph_instance.c b/graph_instance.c
index 25a24a41dbd701a8772d4a682024053f0be2cd49..11629a5ade4d761d7827104bb58430a6c4d44299 100644 (file)
--- a/graph_instance.c
+++ b/graph_instance.c
#include "graph_instance.h"
#include "graph_ident.h"
+#include "graph_list.h"
#include "common.h"
#include "utils_params.h"
diff --git a/graph_list.c b/graph_list.c
index f59508d963ce775ac66d6b02a9adf9da5e235435..965fcbac4f6caad5913b9a0097dd2937ec773ffb 100644 (file)
--- a/graph_list.c
+++ b/graph_list.c
return (gl_add_graph_internal (cfg, &gl_staging, &gl_staging_num));
} /* }}} int gl_add_graph */
-int graph_config_submit (void) /* {{{ */
+int gl_config_submit (void) /* {{{ */
{
graph_config_t **old;
size_t old_num;
diff --git a/graph_list.h b/graph_list.h
index 8f21e86d8e7b037503b2a597966a2df9a65e0c0d..c17d6fc08c17c220c2e911eeb85f1e5cd0ff75f5 100644 (file)
--- a/graph_list.h
+++ b/graph_list.h
*/
int gl_add_graph (graph_config_t *cfg);
+int gl_config_submit (void);
+
int gl_graph_get_all (gl_cfg_callback callback,
void *user_data);