**/
#include "collectd.h"
+
#include "plugin.h"
#include "common.h"
#include "utils_ignorelist.h"
"Temperature",
"IgnoreSelectedTemperature",
"ShowPower",
- "PowerSensor",
- "IgnorePowerSelected"
+ "Power",
+ "IgnoreSelectedPower"
};
static int config_keys_num = STATIC_ARRAY_SIZE (config_keys);
invert = 0;
ignorelist_set_invert(temp_ignore,invert);
}
- else if (strcasecmp("PowerSensor",key) == 0)
+ else if (strcasecmp("Power",key) == 0)
{
ignorelist_add(power_ignore,value);
}
- else if (strcasecmp("IgnorePowerSelected",key) == 0)
+ else if (strcasecmp("IgnoreSelectedPower",key) == 0)
{
int invert = 1;
if (IS_TRUE(value))
static int mic_read_temps(int mic)
{
size_t num_therms = STATIC_ARRAY_SIZE(therm_ids);
- size_t j;
- for (j = 0; j < num_therms; j++) {
+ for (size_t j = 0; j < num_therms; j++) {
U32 status;
U32 temp_buffer;
U32 buffer_size = (U32)sizeof(temp_buffer);
}
if (show_cpu_cores) {
- int j;
- for (j = 0; j < core_util.core; j++) {
+ for (int j = 0; j < core_util.core; j++) {
mic_submit_cpu(mic, "user", j, core_jiffs[j].user);
mic_submit_cpu(mic, "sys", j, core_jiffs[j].sys);
mic_submit_cpu(mic, "nice", j, core_jiffs[j].nice);
static int mic_read (void)
{
- int i;
U32 ret;
int error;
error=0;
- for (i=0;i<num_mics;i++) {
+ for (int i=0;i<num_mics;i++) {
ret = MicInitAdapter(&mic_handle,&mics[i]);
if (ret != MIC_ACCESS_API_SUCCESS) {
ERROR("mic plugin: Problem initializing MicAdapter: %s",
static int mic_shutdown (void)
{
if (mic_handle)
- MicCloseAPI(&mic_handle);
+ MicCloseAPI(&mic_handle);
+ mic_handle = NULL;
+
return (0);
}