summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fa56155)
raw | patch | inline | side by side (parent: fa56155)
author | campbellsean@google.com <campbellsean@google.com> | |
Fri, 6 Oct 2017 17:47:45 +0000 (13:47 -0400) | ||
committer | campbellsean@google.com <campbellsean@google.com> | |
Fri, 6 Oct 2017 17:47:45 +0000 (13:47 -0400) |
src/daemon/collectd.h | patch | blob | history | |
src/daemon/globals.c | patch | blob | history | |
src/daemon/globals.h | patch | blob | history | |
src/daemon/plugin.h | patch | blob | history |
diff --git a/src/daemon/collectd.h b/src/daemon/collectd.h
index 223119504be740141fd9a27850148f58bac93f10..0558aa400696183a42e9bac546b56e73e019656c 100644 (file)
--- a/src/daemon/collectd.h
+++ b/src/daemon/collectd.h
#include <sys/param.h>
#endif
-#if HAVE_KSTAT_H
-#include <kstat.h>
-#endif
-
#ifndef PACKAGE_NAME
#define PACKAGE_NAME "collectd"
#endif
diff --git a/src/daemon/globals.c b/src/daemon/globals.c
index bde7eb222cd58654c85b257329029a2b1676d2e7..b720cd88e5b8c59ca806cb5e2454c783b8fb7575 100644 (file)
--- a/src/daemon/globals.c
+++ b/src/daemon/globals.c
#include "common.h"
#include "globals.h"
-#include "plugin.h"
void hostname_set(char const *hostname) {
sstrncpy(hostname_g, hostname, sizeof(hostname_g));
}
+/*
+ * Global variables
+ */
char *hostname_g;
cdtime_t interval_g;
-int pidfile_from_cli = 0;
int timeout_g;
-#if HAVE_LIBKSTAT
kstat_ctl_t *kc;
-#endif /* HAVE_LIBKSTAT */
+
diff --git a/src/daemon/globals.h b/src/daemon/globals.h
index 58700316343e4142f9d29ddc2755b1239793e503..b4eb5f6fefdd1637fed75791d7b40f1bbeae3faf 100644 (file)
--- a/src/daemon/globals.h
+++ b/src/daemon/globals.h
#include <inttypes.h>
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
+#ifndef DATA_MAX_NAME_LEN
+#define DATA_MAX_NAME_LEN 128
+#endif
+
/* Type for time as used by "utils_time.h" */
typedef uint64_t cdtime_t;
diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h
index 4f877e0ecb2f3407b8e475f99768facc12df03da..095d662f0b83a35eb800b295782132a7a234b9d6 100644 (file)
--- a/src/daemon/plugin.h
+++ b/src/daemon/plugin.h
#include <pthread.h>
-#ifndef DATA_MAX_NAME_LEN
-#define DATA_MAX_NAME_LEN 128
-#endif
-
#define DS_TYPE_COUNTER 0
#define DS_TYPE_GAUGE 1
#define DS_TYPE_DERIVE 2