From d13d3f15091f02e9fd203ae606c42facb9108ffc Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 17 May 2007 23:00:18 +0200 Subject: [PATCH] disk plugin: Remove slashed from disk-names. --- src/disk.c | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.11.0