[PATCH] extend the test in bbu_std_file_handler() to also check for -ENOTSUP.

Sascha Hauer sha at pengutronix.de
Wed Feb 24 03:49:31 EST 2021


On Tue, Feb 23, 2021 at 05:31:22PM +0800, jameszxj wrote:
> extend the test in bbu_std_file_handler() to also check for  -ENOTSUP.
> 
> Signed-off-by: zhengxiaojun <jameszxj at gmail.com>
> ---
>  common/bbu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/common/bbu.c b/common/bbu.c
> index 1279d56..ee9f78e 100644
> --- a/common/bbu.c
> +++ b/common/bbu.c
> @@ -313,7 +313,7 @@ static int bbu_std_file_handler(struct bbu_handler *handler,
>  		return fd;
>  
>  	ret = protect(fd, data->len, 0, 0);
> -	if (ret && ret != -ENOSYS) {
> +	if (ret && (ret != -ENOSYS) && (ret != -ENOTSUPP)) {
>  		printf("unprotecting %s failed with %s\n", data->devicefile,
>  				strerror(-ret));
>  		goto err_close;
> -- 
> 2.7.4
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

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