[PATCH 2/3] bootstrap: Fix partition creation

Steffen Trumtrar s.trumtrar at pengutronix.de
Thu Oct 12 04:47:40 PDT 2023


On 2023-10-12 at 13:10 +02, Sascha Hauer <s.hauer at 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 at 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    |



More information about the barebox mailing list