[PATCH 1/5] cdev-alias: support referencing diskuuid without child partition

Sascha Hauer s.hauer at pengutronix.de
Fri Dec 12 00:36:37 PST 2025


Apart from the comments I made, for this series:

Reviewed-by: Sascha Hauer <s.hauer at pengutrinix.de>

On Thu, Dec 11, 2025 at 10:00:43PM +0100, Ahmad Fatoum wrote:
> This is already the case with other cdev aliases, so support this for
> symmetry.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  common/cdev-alias.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/common/cdev-alias.c b/common/cdev-alias.c
> index e5a059ad7f4d..1878553615d2 100644
> --- a/common/cdev-alias.c
> +++ b/common/cdev-alias.c
> @@ -57,9 +57,11 @@ static int cdev_alias_resolve_diskuuid(struct cdev_alias_res *cdev_alias_res,
>  		if (strcasecmp(cdev->diskuuid, uuid))
>  			continue;
>  
> -		cdev = cdev_find_partition(cdev, arg);
> -		if (!cdev)
> -			return -ENODEV;
> +		if (arg) {
> +			cdev = cdev_find_partition(cdev, arg);
> +			if (!cdev)
> +				return -ENODEV;
> +		}
>  
>  		return fn(cdev, data);
>  	}
> -- 
> 2.47.3
> 
> 
> 

-- 
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 |



More information about the barebox mailing list