projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/collectd.h: Use `#pragma GCC poison' to disable evil functions.
[collectd.git]
/
src
/
collectd.c
diff --git
a/src/collectd.c
b/src/collectd.c
index
70223b7
..
4e521f9
100644
(file)
--- a/
src/collectd.c
+++ b/
src/collectd.c
@@
-29,7
+29,10
@@
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
-#include "types_list.h"
+
+#if HAVE_STATGRAB_H
+# include <statgrab.h>
+#endif
/*
* Global variables
/*
* Global variables
@@
-88,7
+91,11
@@
static int init_hostname (void)
status = getaddrinfo (hostname_g, NULL, &ai_hints, &ai_list);
if (status != 0)
{
status = getaddrinfo (hostname_g, NULL, &ai_hints, &ai_list);
if (status != 0)
{
- ERROR ("getaddrinfo failed.");
+ ERROR ("Looking up \"%s\" failed. You have set the "
+ "\"FQDNLookup\" option, but I cannot resolve "
+ "my hostname to a fully qualified domain "
+ "name. Please fix you network "
+ "configuration.", hostname_g);
return (-1);
}
return (-1);
}
@@
-216,7
+223,7
@@
static void update_kstat (void)
/* TODO
* Remove all settings but `-f' and `-C'
*/
/* TODO
* Remove all settings but `-f' and `-C'
*/
-static void exit_usage (
char *name
)
+static void exit_usage (
void
)
{
printf ("Usage: "PACKAGE" [OPTIONS]\n\n"
{
printf ("Usage: "PACKAGE" [OPTIONS]\n\n"
@@
-260,7
+267,6
@@
static int do_init (void)
}
#endif
}
#endif
- read_types_list ();
plugin_init_all ();
return (0);
plugin_init_all ();
return (0);
@@
-290,7
+296,7
@@
static int do_loop (void)
#endif
/* Issue all plugins */
#endif
/* Issue all plugins */
- plugin_read_all (
&loop
);
+ plugin_read_all ();
if (gettimeofday (&tv_now, NULL) < 0)
{
if (gettimeofday (&tv_now, NULL) < 0)
{
@@
-406,7
+412,7
@@
int main (int argc, char **argv)
#endif /* COLLECT_DAEMON */
case 'h':
default:
#endif /* COLLECT_DAEMON */
case 'h':
default:
- exit_usage (
argv[0]
);
+ exit_usage ();
} /* switch (c) */
} /* while (1) */
} /* switch (c) */
} /* while (1) */