From f9ee71b22e47eec32ceedd8d85afc99949a084a6 Mon Sep 17 00:00:00 2001 From: niki Date: Wed, 14 Dec 2005 18:32:51 +0000 Subject: [PATCH] removed extern time_t curtime; in all modules (is present in src/collectd.h). --- configure.in | 4 ++++ src/cpu.c | 2 -- src/cpufreq.c | 2 -- src/disk.c | 2 -- src/hddtemp.c | 2 -- src/load.c | 2 -- src/memory.c | 2 -- src/nfs.c | 2 -- src/ping.c | 2 -- src/processes.c | 2 -- src/sensors.c | 2 -- src/serial.c | 1 - src/tape.c | 2 -- src/traffic.c | 2 -- src/users.c | 2 -- 15 files changed, 4 insertions(+), 27 deletions(-) diff --git a/configure.in b/configure.in index 99895a5f..e0ce88a0 100644 --- a/configure.in +++ b/configure.in @@ -312,6 +312,8 @@ fi # # Check for enabled/disabled features # +m4_divert_once([HELP_ENABLE], [ +collectd features:]) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging (disabled by default)]), [], [enable_debug="no"]) @@ -352,6 +354,8 @@ AC_DEFINE_UNQUOTED(COLLECT_DAEMON, [$collect_daemon], [Wether or not to enable daemon mode]) AM_CONDITIONAL(BUILD_DAEMON, test "x$enable_daemon" = "xyes") +m4_divert_once([HELP_ENABLE], [ +collectd modules:]) AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"]) if test "x$enable_cpu" != "xno" then diff --git a/src/cpu.c b/src/cpu.c index 830f8ace..7a9700ae 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -76,8 +76,6 @@ static char *ds_def[] = }; static int ds_num = 5; -extern time_t curtime; - void cpu_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/cpufreq.c b/src/cpufreq.c index 7a6227ba..001ccec2 100644 --- a/src/cpufreq.c +++ b/src/cpufreq.c @@ -43,8 +43,6 @@ static char *ds_def[] = }; static int ds_num = 1; -extern time_t curtime; - #define BUFSIZE 256 void cpufreq_init (void) diff --git a/src/disk.c b/src/disk.c index a6a583d2..dc0232d4 100644 --- a/src/disk.c +++ b/src/disk.c @@ -80,8 +80,6 @@ static char *part_ds_def[] = }; static int part_ds_num = 4; -extern time_t curtime; - void disk_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/hddtemp.c b/src/hddtemp.c index 4b749c1d..64bd3008 100644 --- a/src/hddtemp.c +++ b/src/hddtemp.c @@ -61,8 +61,6 @@ static char *ds_def[] = }; static int ds_num = 1; -extern time_t curtime; - typedef struct hddname { int major; diff --git a/src/load.c b/src/load.c index 7b3462be..d082816a 100644 --- a/src/load.c +++ b/src/load.c @@ -51,8 +51,6 @@ static char *ds_def[] = }; static int ds_num = 3; -extern time_t curtime; - void load_init (void) { return; diff --git a/src/memory.c b/src/memory.c index 3291bc87..f7924456 100644 --- a/src/memory.c +++ b/src/memory.c @@ -46,8 +46,6 @@ static int pagesize; static kstat_t *ksp; #endif /* HAVE_LIBKSTAT */ -extern time_t curtime; - void memory_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/nfs.c b/src/nfs.c index d21685c7..3321630a 100644 --- a/src/nfs.c +++ b/src/nfs.c @@ -141,8 +141,6 @@ static kstat_t *nfs4_ksp_server; /* Possibly TODO: NFSv4 statistics */ -extern time_t curtime; - void nfs_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/ping.c b/src/ping.c index eb35360b..d418232f 100644 --- a/src/ping.c +++ b/src/ping.c @@ -44,8 +44,6 @@ static char *ds_def[] = }; static int ds_num = 1; -extern time_t curtime; - void ping_init (void) { int i; diff --git a/src/processes.c b/src/processes.c index c69b5ce8..821472bd 100644 --- a/src/processes.c +++ b/src/processes.c @@ -43,8 +43,6 @@ static char *ds_def[] = }; static int ds_num = 6; -extern time_t curtime; - void ps_init (void) { } diff --git a/src/sensors.c b/src/sensors.c index 390a7a04..270ba035 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -48,8 +48,6 @@ static char *ds_def[] = }; static int ds_num = 1; -extern time_t curtime; - void collectd_sensors_init (void) { FILE *fh; diff --git a/src/serial.c b/src/serial.c index 9d41fde6..78210300 100644 --- a/src/serial.c +++ b/src/serial.c @@ -63,7 +63,6 @@ void serial_submit (char *device, unsigned long long outgoing) { char buf[BUFSIZE]; - time_t curtime = time(NULL); if (snprintf (buf, BUFSIZE, "%u:%llu:%llu", (unsigned int) curtime, incoming, outgoing) >= BUFSIZE) diff --git a/src/tape.c b/src/tape.c index c0fba0cb..3697c633 100644 --- a/src/tape.c +++ b/src/tape.c @@ -52,8 +52,6 @@ static char *tape_ds_def[] = }; static int tape_ds_num = 8; -extern time_t curtime; - void tape_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/traffic.c b/src/traffic.c index 66f2b133..5a276a82 100644 --- a/src/traffic.c +++ b/src/traffic.c @@ -45,8 +45,6 @@ static char *ds_def[] = }; static int ds_num = 2; -extern time_t curtime; - void traffic_init (void) { #ifdef HAVE_LIBKSTAT diff --git a/src/users.c b/src/users.c index 9e8dc34d..31c936c8 100644 --- a/src/users.c +++ b/src/users.c @@ -42,8 +42,6 @@ static char *ds_def[] = { }; static int ds_num = 1; -extern time_t curtime; - void users_init(void) { /* we have nothing to do here :-) */ -- 2.30.2