oconfig_item_t *ci) {
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) {
ERROR("`value' match: `%s' needs exactly one string argument.", ci->key);
oconfig_item_t *ci) {
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_STRING)) {
ERROR("`value' match: `%s' needs exactly one string argument.", ci->key);
ERROR("`value' match: Passing `%s' to the `%s' option is invalid. "
"The argument must either be `All' or `Any'.",
ci->values[0].value.string, ci->key);
ERROR("`value' match: Passing `%s' to the `%s' option is invalid. "
"The argument must either be `All' or `Any'.",
ci->values[0].value.string, ci->key);
} /* }}} int mv_config_add_satisfy */
static int mv_config_add_data_source(mv_match_t *m, /* {{{ */
} /* }}} int mv_config_add_satisfy */
static int mv_config_add_data_source(mv_match_t *m, /* {{{ */
/* Check number of arbuments. */
if (ci->values_num < 1) {
ERROR("`value' match: `%s' needs at least one argument.", ci->key);
/* Check number of arbuments. */
if (ci->values_num < 1) {
ERROR("`value' match: `%s' needs at least one argument.", ci->key);
temp = realloc(m->data_sources, new_data_sources_num * sizeof(char *));
if (temp == NULL) {
ERROR("`value' match: realloc failed.");
temp = realloc(m->data_sources, new_data_sources_num * sizeof(char *));
if (temp == NULL) {
ERROR("`value' match: realloc failed.");
} /* }}} int mv_config_add_data_source */
static int mv_config_add_gauge(gauge_t *ret_value, /* {{{ */
} /* }}} int mv_config_add_data_source */
static int mv_config_add_gauge(gauge_t *ret_value, /* {{{ */
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_NUMBER)) {
ERROR("`value' match: `%s' needs exactly one numeric argument.", ci->key);
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_NUMBER)) {
ERROR("`value' match: `%s' needs exactly one numeric argument.", ci->key);
} /* }}} int mv_config_add_gauge */
static int mv_config_add_boolean(int *ret_value, /* {{{ */
} /* }}} int mv_config_add_gauge */
static int mv_config_add_boolean(int *ret_value, /* {{{ */
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_BOOLEAN)) {
ERROR("`value' match: `%s' needs exactly one boolean argument.", ci->key);
if ((ci->values_num != 1) || (ci->values[0].type != OCONFIG_TYPE_BOOLEAN)) {
ERROR("`value' match: `%s' needs exactly one boolean argument.", ci->key);
} /* }}} int mv_config_add_boolean */
static int mv_create(const oconfig_item_t *ci, void **user_data) /* {{{ */
} /* }}} int mv_config_add_boolean */
static int mv_create(const oconfig_item_t *ci, void **user_data) /* {{{ */
m = calloc(1, sizeof(*m));
if (m == NULL) {
ERROR("mv_create: calloc failed.");
m = calloc(1, sizeof(*m));
if (m == NULL) {
ERROR("mv_create: calloc failed.");
} /* }}} int mv_create */
static int mv_destroy(void **user_data) /* {{{ */
{
if ((user_data != NULL) && (*user_data != NULL))
mv_free_match(*user_data);
} /* }}} int mv_create */
static int mv_destroy(void **user_data) /* {{{ */
{
if ((user_data != NULL) && (*user_data != NULL))
mv_free_match(*user_data);
} /* }}} int mv_destroy */
static int mv_match(const data_set_t *ds, const value_list_t *vl, /* {{{ */
} /* }}} int mv_destroy */
static int mv_match(const data_set_t *ds, const value_list_t *vl, /* {{{ */