/* Can't upgrade if both instances have been set. */
if ((vl->plugin_instance[0] != 0) && (vl->type_instance[0] != 0))
/* Can't upgrade if both instances have been set. */
if ((vl->plugin_instance[0] != 0) && (vl->type_instance[0] != 0))
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
static int v5_interface(const data_set_t *ds, value_list_t *vl) /* {{{ */
{
if ((vl->plugin_instance[0] != 0) || (vl->type_instance[0] == 0))
static int v5_interface(const data_set_t *ds, value_list_t *vl) /* {{{ */
{
if ((vl->plugin_instance[0] != 0) || (vl->type_instance[0] == 0))
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Dispatch new value lists instead of this one */
new_vl.values[0].derive = (derive_t)vl->values[0].counter;
/* Dispatch new value lists instead of this one */
new_vl.values[0].derive = (derive_t)vl->values[0].counter;
- ssnprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
- "demand_data-%s", is_hits ? "hit" : "miss");
+ snprintf(new_vl.type_instance, sizeof(new_vl.type_instance), "demand_data-%s",
+ is_hits ? "hit" : "miss");
- ssnprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
- "demand_metadata-%s", is_hits ? "hit" : "miss");
+ snprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
+ "demand_metadata-%s", is_hits ? "hit" : "miss");
- ssnprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
- "prefetch_data-%s", is_hits ? "hit" : "miss");
+ snprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
+ "prefetch_data-%s", is_hits ? "hit" : "miss");
- ssnprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
- "prefetch_metadata-%s", is_hits ? "hit" : "miss");
+ snprintf(new_vl.type_instance, sizeof(new_vl.type_instance),
+ "prefetch_metadata-%s", is_hits ? "hit" : "miss");
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
sstrncpy(new_vl.type_instance, "L2", sizeof(new_vl.type_instance));
/* Copy the actual values. */
sstrncpy(new_vl.type_instance, "L2", sizeof(new_vl.type_instance));
/* Copy the actual values. */
- new_vl.values[0].derive = (derive_t)vl->values[0].counter;
- new_vl.values[1].derive = (derive_t)vl->values[1].counter;
+ value_t values[] = {
+ {.derive = (derive_t)vl->values[0].counter},
+ {.derive = (derive_t)vl->values[1].counter},
+ };
+ new_vl.values = values;
+ new_vl.values_len = STATIC_ARRAY_SIZE(values);
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
/* Copy everything: Time, interval, host, ... */
memcpy(&new_vl, vl, sizeof(new_vl));
/* Reset data we can't simply copy */
} /* }}} int v5_destroy */
static int v5_create(const oconfig_item_t *ci, void **user_data) /* {{{ */
{
*user_data = NULL;
} /* }}} int v5_destroy */
static int v5_create(const oconfig_item_t *ci, void **user_data) /* {{{ */
{
*user_data = NULL;
} /* }}} int v5_create */
static int v5_invoke(const data_set_t *ds, value_list_t *vl, /* {{{ */
notification_meta_t __attribute__((unused)) * *meta,
void __attribute__((unused)) * *user_data) {
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
} /* }}} int v5_create */
static int v5_invoke(const data_set_t *ds, value_list_t *vl, /* {{{ */
notification_meta_t __attribute__((unused)) * *meta,
void __attribute__((unused)) * *user_data) {
if ((ds == NULL) || (vl == NULL) || (user_data == NULL))
tproc.invoke = v5_invoke;
fc_register_target("v5upgrade", tproc);
} /* module_register */
tproc.invoke = v5_invoke;
fc_register_target("v5upgrade", tproc);
} /* module_register */