X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fethstat.c;fp=src%2Fethstat.c;h=a30a5d155243bb193892455dc56afe8bbc5d5c36;hp=dec14f3d148962df3b1aaf41eb1f50f0a7a5f92c;hb=21602dea4a6ac2a9003c2f2b0aa4c87ce5e475bf;hpb=c1219a1c9db2e8400e2ee94b87f86ccd441485d5 diff --git a/src/ethstat.c b/src/ethstat.c index dec14f3d..a30a5d15 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -312,9 +312,13 @@ static int ethstat_read_interface (char *device) for (i = 0; i < n_stats; i++) { - const char *stat_name; + char *stat_name; stat_name = (void *) &strings->data[i * ETH_GSTRING_LEN]; + /* Remove leading spaces in key name */ + while (isspace ((int) *stat_name)) + stat_name++; + DEBUG("ethstat plugin: device = \"%s\": %s = %"PRIu64, device, stat_name, (uint64_t) stats->data[i]); ethstat_submit_value (device,