X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftape.c;h=52da2bc69db465a6e99bf97e529f43c56a0cd5c8;hb=51181b899668ad2c232a152d6e5e787c4eb049cc;hp=caca537b0038be024f2771d979f3eeeb289ce53d;hpb=d3fc6d0831a63af2e96300f488a9f8f5fc3183fb;p=collectd.git diff --git a/src/tape.c b/src/tape.c index caca537b..52da2bc6 100644 --- a/src/tape.c +++ b/src/tape.c @@ -21,6 +21,7 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -58,17 +59,16 @@ static int tape_init (void) static void tape_submit (const char *plugin_instance, const char *type, - counter_t read, counter_t write) + derive_t read, derive_t write) { value_t values[2]; value_list_t vl = VALUE_LIST_INIT; - values[0].counter = read; - values[1].counter = write; + values[0].derive = read; + values[1].derive = write; vl.values = values; vl.values_len = 2; - vl.time = time (NULL); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "tape", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, plugin_instance, @@ -99,7 +99,6 @@ static int tape_read (void) # error "kstat_io_t does not have the required members" #endif static kstat_io_t kio; - int i; if (kc == NULL) return (-1); @@ -107,7 +106,7 @@ static int tape_read (void) if (numtape <= 0) return (-1); - for (i = 0; i < numtape; i++) + for (int i = 0; i < numtape; i++) { if (kstat_read (kc, ksp[i], &kio) == -1) continue;