2006-06-24 Robert Millan <robertmh@gnu.org>

* lib/device.c (write_to_partition): /dev/ataraid/ and /dev/rd/
        partitions have a "p" prefix.  Add it.
This commit is contained in:
robertmh 2006-06-24 14:27:29 +00:00
parent 5ac9679fb0
commit bde9a318fb
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2006-06-24 Robert Millan <robertmh@gnu.org>
* lib/device.c (write_to_partition): /dev/ataraid/ and /dev/rd/
partitions have a "p" prefix. Add it.
2006-06-24 Robert Millan <robertmh@gnu.org>
* lib/device.c (get_i2o_disk_name): New function.

View file

@ -890,6 +890,12 @@ write_to_partition (char **map, int drive, int partition,
if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
strcpy (dev + strlen(dev) - 5, "/part");
}
else
{
if ((strncmp (dev, "/dev/ataraid/", 13) == 0) ||
(strncmp (dev, "/dev/rd/", 8) == 0))
strcpy (dev + strlen(dev), "p");
}
sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
/* Open the partition. */