projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef14b13
)
disk plugin: Remove slashed from disk-names.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 21:00:18 +0000
(23:00 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 21:00:18 +0000
(23:00 +0200)
src/disk.c
patch
|
blob
|
history
diff --git
a/src/disk.c
b/src/disk.c
index
38c161f
..
5739f36
100644
(file)
--- 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)