diff options
author | jameszxj <jameszxj@gmail.com> | 2021-02-23 17:31:22 +0800 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-02-24 09:49:22 +0100 |
commit | 3cd74532d1ce8555a9995f1b286fe54bf0ebf1c2 (patch) | |
tree | a76b2431cfef02e6689ff1127ed1b935af92f3a0 | |
parent | 2575ef9d523e8aa1f7a187c44cdff9dc8ee172d3 (diff) | |
download | barebox-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.c | 2 |
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; |