From: Florian Forster Date: Sat, 15 Sep 2007 08:58:53 +0000 (+0200) Subject: apcups plugin: Warn about the irritating name `apcups_charge_pct'. X-Git-Tag: collectd-3.11.7~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8cc583bb44d46a2333b92d8ff4619fce2de5f30f;p=collectd.git apcups plugin: Warn about the irritating name `apcups_charge_pct'. --- diff --git a/src/apcups.c b/src/apcups.c index cd64426a..84ef94e6 100644 --- a/src/apcups.c +++ b/src/apcups.c @@ -508,6 +508,8 @@ static void apc_submit (struct apc_detail_s *apcups_detail) 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); + /* `apcups_charge_pct' actually is the wrong name, but we keep it that + * way for backwards compatibility. */ 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); @@ -555,6 +557,8 @@ void module_register (void) plugin_register (MODULE_NAME, apcups_init, apcups_read, NULL); plugin_register ("apcups_voltage", NULL, NULL, apc_write_voltage); plugin_register ("apcups_charge", NULL, NULL, apc_write_charge); + /* `apcups_charge_pct' actually is the wrong name, but we keep it that + * way for backwards compatibility. */ plugin_register ("apcups_charge_pct", NULL, NULL, apc_write_percent); plugin_register ("apcups_timeleft", NULL, NULL, apc_write_timeleft); plugin_register ("apcups_temp", NULL, NULL, apc_write_temperature);