summaryrefslogtreecommitdiff
path: root/tools/env
diff options
context:
space:
mode:
Diffstat (limited to 'tools/env')
-rw-r--r--tools/env/fw_env.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index e50c075559..965e1662d7 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1088,14 +1088,16 @@ static int flash_io (int mode)
rc = flash_write (fd_current, fd_target, dev_target);
- if (fsync (fd_current)) {
+ if (fsync(fd_current) &&
+ !(errno == EINVAL || errno == EROFS)) {
fprintf (stderr,
"fsync failed on %s: %s\n",
DEVNAME (dev_current), strerror (errno));
}
if (HaveRedundEnv) {
- if (fsync (fd_target)) {
+ if (fsync(fd_target) &&
+ !(errno == EINVAL || errno == EROFS)) {
fprintf (stderr,
"fsync failed on %s: %s\n",
DEVNAME (dev_current), strerror (errno));