+2009-02-04 Felix Zielcke <fzielcke@z-51.de>
+
+ util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
+ /dev/md/NpN style mdraid devices.
+
2009-02-03 Felix Zielcke <fzielcke@z-51.de>
* util/unifont2pff.rb: Remove.
}
else if (os_dev[7] >= '0' && os_dev[7] <= '9')
{
- asprintf (&grub_dev, "md%s", os_dev + sizeof ("/dev/md") - 1);
+ char *p , *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ asprintf (&grub_dev, "md%s", p);
+ free (p);
}
else if (os_dev[7] == '/' && os_dev[8] >= '0' && os_dev[8] <= '9')
{
- asprintf (&grub_dev, "md%s", os_dev + sizeof ("/dev/md/") - 1);
+ char *p , *q;
+
+ p = strdup (os_dev + sizeof ("/dev/md/") - 1);
+
+ q = strchr (p, 'p');
+ if (q)
+ *q = ',';
+
+ asprintf (&grub_dev, "md%s", p);
+ free (p);
}
else
grub_util_error ("Unknown kind of RAID device `%s'", os_dev);