X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fload.c;h=1adc62182fc47428b73b148c21e4219fa23c19f7;hb=a07f44c9cd5828a84545dcfe22544bfed2ea8812;hp=ac07fa642d9b2a5c21305c3e5a15fe9af92b7c5f;hpb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;p=collectd.git diff --git a/src/load.c b/src/load.c index ac07fa64..1adc6218 100644 --- a/src/load.c +++ b/src/load.c @@ -28,8 +28,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include @@ -55,20 +55,22 @@ #include #endif /* HAVE_PERFSTAT */ -static bool report_relative_load = 0; +static bool report_relative_load; static const char *config_keys[] = {"ReportRelative"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); static int load_config(const char *key, const char *value) { - if (strcasecmp(key, "ReportRelative") == 0) + if (strcasecmp(key, "ReportRelative") == 0) { #ifdef _SC_NPROCESSORS_ONLN - report_relative_load = IS_TRUE(value) ? 1 : 0; + report_relative_load = IS_TRUE(value); #else WARNING("load plugin: The \"ReportRelative\" configuration " "is not available, because I can't determine the " "number of CPUS on this system. Sorry."); #endif + return 0; + } return -1; } static void load_submit(gauge_t snum, gauge_t mnum, gauge_t lnum) {