Merge branch 'collectd-4.0' into collectd-4.1
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 11 Sep 2007 09:50:51 +0000 (11:50 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 11 Sep 2007 09:50:51 +0000 (11:50 +0200)
ChangeLog
src/apcups.c
src/collectd.c
src/common.c

index 9e1a2d3..30564d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,8 @@
 2007-09-10, Version 4.0.8
        * collectd: The `sstrerror' function was improved to work correctly
          with the broken GNU version of `strerror_r'.
+       * apcups plugin: Fix the `types' used to submit the values: They still
+         has an `apcups_' prefix which doesn't work anymore.
 
 2007-08-26, Version 4.0.7
        * documentation: Some typos have been fixed and some information has
index 62c7a3c..8f315c9 100644 (file)
@@ -389,14 +389,14 @@ static void apc_submit_generic (char *type, char *type_inst, double value)
 
 static void apc_submit (struct apc_detail_s *apcups_detail)
 {
-       apc_submit_generic ("apcups_voltage",    "input",   apcups_detail->linev);
-       apc_submit_generic ("apcups_voltage",    "output",  apcups_detail->outputv);
-       apc_submit_generic ("apcups_voltage",    "battery", apcups_detail->battv);
-       apc_submit_generic ("apcups_charge",     "",        apcups_detail->bcharge);
-       apc_submit_generic ("apcups_charge_pct", "",        apcups_detail->loadpct);
-       apc_submit_generic ("apcups_timeleft",   "",        apcups_detail->timeleft);
-       apc_submit_generic ("apcups_temp",       "",        apcups_detail->itemp);
-       apc_submit_generic ("apcups_frequency",  "input",   apcups_detail->linefreq);
+       apc_submit_generic ("voltage",    "input",   apcups_detail->linev);
+       apc_submit_generic ("voltage",    "output",  apcups_detail->outputv);
+       apc_submit_generic ("voltage",    "battery", apcups_detail->battv);
+       apc_submit_generic ("charge",     "",        apcups_detail->bcharge);
+       apc_submit_generic ("percent",    "charge",  apcups_detail->loadpct);
+       apc_submit_generic ("timeleft",   "",        apcups_detail->timeleft);
+       apc_submit_generic ("temperature", "",       apcups_detail->itemp);
+       apc_submit_generic ("frequency",  "input",   apcups_detail->linefreq);
 }
 
 static int apcups_read (void)
index 4fbd5c0..4e18fd6 100644 (file)
@@ -114,7 +114,7 @@ static int change_basedir (const char *orig_dir)
                        if (mkdir (orig_dir, 0755) == -1)
                        {
                                char errbuf[1024];
-                               ERROR ("mkdir (%s): %s", orig_dir,
+                               ERROR ("change_basedir: mkdir (%s): %s", orig_dir,
                                                sstrerror (errno, errbuf,
                                                        sizeof (errbuf)));
                                return (-1);
index 951bae3..974a29e 100644 (file)
@@ -421,7 +421,7 @@ int check_create_dir (const char *file_orig)
                                if (mkdir (dir, 0755) == -1)
                                {
                                        char errbuf[1024];
-                                       ERROR ("mkdir (%s): %s", dir,
+                                       ERROR ("check_create_dir: mkdir (%s): %s", dir,
                                                        sstrerror (errno,
                                                                errbuf, sizeof (errbuf)));
                                        return (-1);
@@ -444,7 +444,7 @@ int check_create_dir (const char *file_orig)
        }
 
        return (0);
-}
+} /* check_create_dir */
 
 #ifdef HAVE_LIBKSTAT
 int get_kstat (kstat_t **ksp_ptr, char *module, int instance, char *name)