* util/getroot.c (convert_system_partition_to_system_disk): Support

nbd disks.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-12-10 11:12:38 +01:00
parent cc1ce5f9b4
commit 258f43b7d7
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
* util/getroot.c (convert_system_partition_to_system_disk): Support
nbd disks.
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid

View File

@ -1796,6 +1796,18 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st,
return path;
}
if (strncmp ("nbd", p, 3) == 0
&& p[3] >= '0' && p[3] <= '9')
{
char *ptr = p + 3;
while (*ptr >= '0' && *ptr <= '9')
ptr++;
if (*ptr)
*is_part = 1;
*ptr = 0;
return path;
}
/* If this is an IDE, SCSI or Virtio disk. */
if (strncmp ("vdisk", p, 5) == 0
&& p[5] >= 'a' && p[5] <= 'z')