projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon: make function static
[collectd.git]
/
src
/
daemon
/
collectd.c
diff --git
a/src/daemon/collectd.c
b/src/daemon/collectd.c
index
d6060a1
..
50aecd9
100644
(file)
--- a/
src/daemon/collectd.c
+++ b/
src/daemon/collectd.c
@@
-43,6
+43,10
@@
#include <statgrab.h>
#endif
#include <statgrab.h>
#endif
+#if HAVE_KSTAT_H
+#include <kstat.h>
+#endif
+
#ifndef COLLECTD_LOCALE
#define COLLECTD_LOCALE "C"
#endif
#ifndef COLLECTD_LOCALE
#define COLLECTD_LOCALE "C"
#endif
@@
-201,6
+205,7
@@
static int change_basedir(const char *orig_dir, _Bool create) {
} /* static int change_basedir (char *dir) */
#if HAVE_LIBKSTAT
} /* static int change_basedir (char *dir) */
#if HAVE_LIBKSTAT
+extern kstat_ctl_t *kc;
static void update_kstat(void) {
if (kc == NULL) {
if ((kc = kstat_open()) == NULL)
static void update_kstat(void) {
if (kc == NULL) {
if ((kc = kstat_open()) == NULL)
@@
-444,7
+449,7
@@
struct cmdline_config {
_Bool daemonize;
};
_Bool daemonize;
};
-void read_cmdline(int argc, char **argv, struct cmdline_config *config) {
+
static
void read_cmdline(int argc, char **argv, struct cmdline_config *config) {
/* read options */
while (1) {
int c;
/* read options */
while (1) {
int c;
@@
-491,7
+496,7
@@
void read_cmdline(int argc, char **argv, struct cmdline_config *config) {
} /* while (1) */
}
} /* while (1) */
}
-int configure_collectd(struct cmdline_config *config) {
+
static
int configure_collectd(struct cmdline_config *config) {
const char *basedir;
/*
* Read options from the config file, the environment and the command
const char *basedir;
/*
* Read options from the config file, the environment and the command