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

jameszxj jameszxj at gmail.com
Tue Feb 23 04:31:22 EST 2021


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


More information about the barebox mailing list