summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index aa795b26..5de1f35f 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -1390,7 +1390,15 @@ rw_file_exact(int fd, uint8_t *mem, size_t len,
if (errno != EINTR)
err(EIO, "%s: %s", path, rw_type_str);
- errno = 0;
+ /*
+ * EINTR is not fatal, because we
+ * eventually return. We rely on
+ * errno for general error state
+ * after return from rw_file_exact,
+ * so we don't want a false error.
+ */
+ if (errno == EINTR)
+ errno = 0;
}
}