mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
This commit is contained in:
1 parent
4a1a0153c3
commit
80c6d25eef
2 files changed
+15
-4
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2010-11-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/hostdisk.c
|
||||||
|
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
|
||||||
|
|
||||||
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-11-06 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* include/grub/emu/misc.h: Don't include grub/util/libzfs.h.
|
* include/grub/emu/misc.h: Don't include grub/util/libzfs.h.
|
||||||
|
|||||||
@@ -1152,16 +1152,22 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st)
|
|||||||
|| strncmp ("sd", p, 2) == 0)
|
|| strncmp ("sd", p, 2) == 0)
|
||||||
&& p[2] >= 'a' && p[2] <= 'z')
|
&& p[2] >= 'a' && p[2] <= 'z')
|
||||||
{
|
{
|
||||||
/* /dev/[hsv]d[a-z][0-9]* */
|
char *pp = p + 2;
|
||||||
p[3] = '\0';
|
while (*pp >= 'a' && *pp <= 'z')
|
||||||
|
pp++;
|
||||||
|
/* /dev/[hsv]d[a-z]+[0-9]* */
|
||||||
|
*pp = '\0';
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If this is a Xen virtual block device. */
|
/* If this is a Xen virtual block device. */
|
||||||
if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
|
if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
|
||||||
{
|
{
|
||||||
/* /dev/xvd[a-z][0-9]* */
|
char *pp = p + 3;
|
||||||
p[4] = '\0';
|
while (*pp >= 'a' && *pp <= 'z')
|
||||||
|
pp++;
|
||||||
|
/* /dev/xvd[a-z]+[0-9]* */
|
||||||
|
*pp = '\0';
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user