* [PATCH] extend the test in bbu_std_file_handler() to also check for -ENOTSUP.
@ 2021-02-23 9:31 jameszxj
2021-02-24 8:49 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: jameszxj @ 2021-02-23 9:31 UTC (permalink / raw)
To: barebox
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(-)
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] extend the test in bbu_std_file_handler() to also check for -ENOTSUP.
2021-02-23 9:31 [PATCH] extend the test in bbu_std_file_handler() to also check for -ENOTSUP jameszxj
@ 2021-02-24 8:49 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-02-24 8:49 UTC (permalink / raw)
To: jameszxj; +Cc: barebox
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@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 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-24 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 9:31 [PATCH] extend the test in bbu_std_file_handler() to also check for -ENOTSUP jameszxj
2021-02-24 8:49 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox