X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Ftail_csv.c;h=f963528b9015c2b0c8850d19b5488e1566b9ceae;hp=498b4c1153f51ab290bb4a5ed30fa7c684600c49;hb=a9e50e9e30ecde17e167e271060c8183bfcbf407;hpb=20947a863f9b4057948623cedaeb4b7dcc0b6a5e diff --git a/src/tail_csv.c b/src/tail_csv.c index 498b4c11..f963528b 100644 --- a/src/tail_csv.c +++ b/src/tail_csv.c @@ -128,7 +128,7 @@ static _Bool tcsv_check_index(ssize_t index, size_t fields_num, return 1; ERROR("tail_csv plugin: Metric \"%s\": Request for index %zd when " - "only %zu fields are available.", + "only %" PRIsz " fields are available.", name, index, fields_num); return 0; } @@ -451,7 +451,7 @@ static int tcsv_config_add_file(oconfig_item_t *ci) { cf_util_get_cdtime(option, &id->interval); else if (strcasecmp("TimeFrom", option->key) == 0) status = tcsv_config_get_index(option, &id->time_from); - else if (strcasecmp("PluginName", option->key) == 0) + else if (strcasecmp("Plugin", option->key) == 0) status = cf_util_get_string(option, &id->plugin_name); else { WARNING("tail_csv plugin: Option `%s' not allowed here.", option->key); @@ -481,7 +481,7 @@ static int tcsv_config_add_file(oconfig_item_t *ci) { return -1; } - ssnprintf(cb_name, sizeof(cb_name), "tail_csv/%s", id->path); + snprintf(cb_name, sizeof(cb_name), "tail_csv/%s", id->path); status = plugin_register_complex_read( NULL, cb_name, tcsv_read, id->interval, @@ -490,7 +490,6 @@ static int tcsv_config_add_file(oconfig_item_t *ci) { }); if (status != 0) { ERROR("tail_csv plugin: Registering complex read function failed."); - tcsv_instance_definition_destroy(id); return -1; } @@ -533,7 +532,7 @@ static int tcsv_init(void) { /* {{{ */ md->type, md->name); continue; } else if (ds->ds_num != 1) { - ERROR("tail_csv plugin: The type \"%s\" has %zu data sources. " + ERROR("tail_csv plugin: The type \"%s\" has %" PRIsz " data sources. " "Only types with a single data source are supported.", ds->type, ds->ds_num); continue;