#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);
#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);
#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);
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) /* {{{ */
{
oconfig_free (ci);
- graph_config_submit ();
+ gl_config_submit ();
return (0);
} /* }}} int internal_read_config */
#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))
#include "graph_instance.h"
#include "graph_ident.h"
+#include "graph_list.h"
#include "common.h"
#include "utils_params.h"
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;
*/
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);