mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/3] bootstrap: Fix partition creation
Date: Thu, 12 Oct 2023 13:47:40 +0200	[thread overview]
Message-ID: <87lec8ys9f.fsf@pengutronix.de> (raw)
In-Reply-To: <20231012111044.406987-2-s.hauer@pengutronix.de>


On 2023-10-12 at 13:10 +02, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> bootstrap_read_devfs() registers a partition with DEVFS_PARTITION_FIXED.
> The purpose of this flag is that the partition can't be removed later.
> Removing the partition is exactly what bootstrap_read_devfs() does when
> finished, so remove the DEVFS_PARTITION_FIXED flag which doesn't make
> sense here.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  lib/bootstrap/devfs.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lib/bootstrap/devfs.c b/lib/bootstrap/devfs.c
> index 603e6744f2..3d5b1278fb 100644
> --- a/lib/bootstrap/devfs.c
> +++ b/lib/bootstrap/devfs.c
> @@ -88,8 +88,7 @@ void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
>  	struct cdev *cdev, *partition;
>  	char *partname = "x";
>
> -	partition = devfs_add_partition(devname, offset, max_size,
> -					DEVFS_PARTITION_FIXED, partname);
> +	partition = devfs_add_partition(devname, offset, max_size, partname);

This accidentally dropped the flags parameter alltogether, which is still needed by the devfs_add_partition declaration, isn't it?


Best regards,
Steffen

--
Pengutronix e.K.                | Dipl.-Inform. Steffen Trumtrar |
Steuerwalder Str. 21            | https://www.pengutronix.de/    |
31137 Hildesheim, Germany       | Phone: +49-5121-206917-0       |
Amtsgericht Hildesheim, HRA 2686| Fax:   +49-5121-206917-5555    |



  reply	other threads:[~2023-10-12 11:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 11:10 [PATCH 1/3] mtd: initialize partitions_entry Sascha Hauer
2023-10-12 11:10 ` [PATCH 2/3] bootstrap: Fix partition creation Sascha Hauer
2023-10-12 11:47   ` Steffen Trumtrar [this message]
2023-10-12 13:36     ` Sascha Hauer
2023-10-12 11:10 ` [PATCH 3/3] devfs: check for valid flags before removing a partition Sascha Hauer

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=87lec8ys9f.fsf@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@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