All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH] kern: Unbreak support for nested partitions
Date: Mon,  3 Mar 2025 00:02:21 +0300	[thread overview]
Message-ID: <20250302210227.7831-1-phcoder@gmail.com> (raw)

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

             reply	other threads:[~2025-03-02 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-02 21:02 Vladimir Serbinenko [this message]
2025-03-04 13:18 ` [PATCH] kern: Unbreak support for nested partitions Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250302210227.7831-1-phcoder@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.