mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-28 01:59:49 +00:00
kern/partition: Unbreak support for nested partitions
When using syntax "hd0,gtp3,dfly1" then ptr points to trailing part, ",dfly1". So, it's improper to consider it as an invalid partition. Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
cb639acea0
commit
ee27f07a65
1 file changed
+1
-1
@@ -134,7 +134,7 @@ grub_partition_probe (struct grub_disk *disk, const char *str)
|
|||||||
partname_end = ptr;
|
partname_end = ptr;
|
||||||
|
|
||||||
num = grub_strtoul (ptr, &ptr, 0);
|
num = grub_strtoul (ptr, &ptr, 0);
|
||||||
if (*ptr != '\0' || num == 0 || num > GRUB_INT_MAX)
|
if (num == 0 || num > GRUB_INT_MAX)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_NUMBER, N_("invalid partition number"));
|
grub_error (GRUB_ERR_BAD_NUMBER, N_("invalid partition number"));
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user