X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fethstat.c;h=e10021c581155e4fe3887c8ecaaf4fbf4bbeee94;hb=5f8ea314e1852736d1e4b1e28b0b5288aad6f41a;hp=8971f4dfcc2cb0cc10dbf7cf4c8e6ca271fbdc52;hpb=50345eec33951b964e2829e83c30399b71f2baba;p=collectd.git diff --git a/src/ethstat.c b/src/ethstat.c index 8971f4df..e10021c5 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -311,9 +311,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,