disk plugin: Remove slashed from disk-names.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 21:00:18 +0000 (23:00 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Thu, 17 May 2007 21:00:18 +0000 (23:00 +0200)
src/disk.c

index 38c161f..5739f36 100644 (file)
@@ -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)