From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Michael Tretter <m.tretter@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH] mci: only count partitions from partition table
Date: Wed, 30 Apr 2025 14:25:26 +0200 [thread overview]
Message-ID: <558960bc-b1f1-487b-8d0b-4eec489cc1aa@pengutronix.de> (raw)
In-Reply-To: <20250430121047.2899648-1-m.tretter@pengutronix.de>
Hello Michael.
On 4/30/25 14:10, Michael Tretter wrote:
> Linux is only aware of partitions in the partition table, but the list
> of partitions in barebox may contain additional partitions, e.g., for
> state or the environment.
>
> Ignore partitions that are not in the partition table when calculating
> the index of the partition in Linux.
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
I have patches to store partition table index directly into the cdev,
but your patch is more suitable for backporting to master.
Thanks,
Ahmad
>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
> drivers/mci/mci-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index c4830a47a5f4..592543faa7b8 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -2550,7 +2550,8 @@ static char *mci_get_linux_mmcblkdev(struct block_device *blk,
> */
> if (cdev_partname_equal(partcdev, cdev))
> return basprintf("root=/dev/mmcblk%dp%d", id, partnum);
> - partnum++;
> + if (cdev->flags & DEVFS_PARTITION_FROM_TABLE)
> + partnum++;
> }
>
> return NULL;
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2025-04-30 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 12:10 Michael Tretter
2025-04-30 12:25 ` Ahmad Fatoum [this message]
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=558960bc-b1f1-487b-8d0b-4eec489cc1aa@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=m.tretter@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox