* [PATCH] kern: Unbreak support for nested partitions
@ 2025-03-02 21:02 Vladimir Serbinenko
2025-03-04 13:18 ` Daniel Kiper
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Serbinenko @ 2025-03-02 21:02 UTC (permalink / raw)
To: grub-devel; +Cc: Vladimir Serbinenko
When using syntax hd0,gtp3,dfly1 then ptr points to trailing part ",dfly1"
so it's improper to consider it invalid partition
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
grub-core/kern/partition.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/kern/partition.c b/grub-core/kern/partition.c
index c6a578cf4..3b128e6d2 100644
--- a/grub-core/kern/partition.c
+++ b/grub-core/kern/partition.c
@@ -134,7 +134,7 @@ grub_partition_probe (struct grub_disk *disk, const char *str)
partname_end = ptr;
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"));
return 0;
--
2.48.1
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kern: Unbreak support for nested partitions
2025-03-02 21:02 [PATCH] kern: Unbreak support for nested partitions Vladimir Serbinenko
@ 2025-03-04 13:18 ` Daniel Kiper
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kiper @ 2025-03-04 13:18 UTC (permalink / raw)
To: Vladimir Serbinenko; +Cc: grub-devel
On Mon, Mar 03, 2025 at 12:02:21AM +0300, Vladimir Serbinenko wrote:
> When using syntax hd0,gtp3,dfly1 then ptr points to trailing part ",dfly1"
> so it's improper to consider it invalid partition
>
> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-04 13:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02 21:02 [PATCH] kern: Unbreak support for nested partitions Vladimir Serbinenko
2025-03-04 13:18 ` Daniel Kiper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.