[PATCH] partitions: dos: don't open code get_unaligned_le32

Sascha Hauer s.hauer at pengutronix.de
Fri Nov 8 09:29:39 EST 2013


On Fri, Nov 08, 2013 at 01:14:55AM +0100, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>

Runtime tested and applied, thanks

Sascha

> ---
> Hello,
> 
> note this is only compile tested.
> 
> Best regards
> Uwe
> 
>  common/partitions/dos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/partitions/dos.c b/common/partitions/dos.c
> index 31b1ed6..9afd122 100644
> --- a/common/partitions/dos.c
> +++ b/common/partitions/dos.c
> @@ -105,7 +105,7 @@ static int dos_get_disk_signature(struct param_d *p, void *_priv)
>  	if (!buf)
>  		return -EIO;
>  
> -	priv->signature = le32_to_cpup((__le32 *)(buf + 0x1b8));
> +	priv->signature = get_unaligned_le32(buf + 0x1b8);
>  
>  	free(buf);
>  
> -- 
> 1.8.4.rc3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list