summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjameszxj <jameszxj@gmail.com>2021-02-23 17:31:22 +0800
committerSascha Hauer <s.hauer@pengutronix.de>2021-02-24 09:49:22 +0100
commit3cd74532d1ce8555a9995f1b286fe54bf0ebf1c2 (patch)
treea76b2431cfef02e6689ff1127ed1b935af92f3a0
parent2575ef9d523e8aa1f7a187c44cdff9dc8ee172d3 (diff)
downloadbarebox-3cd74532d1ce8555a9995f1b286fe54bf0ebf1c2.tar.gz
barebox-3cd74532d1ce8555a9995f1b286fe54bf0ebf1c2.tar.xz
extend the test in bbu_std_file_handler() to also check for -ENOTSUP.
extend the test in bbu_std_file_handler() to also check for -ENOTSUP. Signed-off-by: zhengxiaojun <jameszxj at gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/bbu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/bbu.c b/common/bbu.c
index 1279d56155..ee9f78ecc9 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;