From: Florian Forster Date: Thu, 17 May 2007 21:00:18 +0000 (+0200) Subject: disk plugin: Remove slashed from disk-names. X-Git-Tag: collectd-4.0.0-rc10~22 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d13d3f15091f02e9fd203ae606c42facb9108ffc;p=collectd.git disk plugin: Remove slashed from disk-names. --- diff --git a/src/disk.c b/src/disk.c index 38c161f5..5739f369 100644 --- a/src/disk.c +++ b/src/disk.c @@ -421,6 +421,13 @@ static int disk_read (void) minor = atoll (fields[1]); disk_name = fields[2]; + { /* Strip slashes from disk_name */ + int i; + for (i = 0; disk_name[i] != '\0'; i++) + if (disk_name[i] == '/') + disk_name[i] = '_'; + } + for (ds = disklist, pre_ds = disklist; ds != NULL; pre_ds = ds, ds = ds->next) if (strcmp (disk_name, ds->name) == 0)