summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index ef0a71e6..6df68f93 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -154,6 +154,8 @@ readFromFile(int *fd, uint8_t *buf, const char *path, int flags, size_t size)
if (errno == ENOTDIR)
errno = 0;
+ else if (errno != 0)
+ return -1;
return read((*fd), buf, size);
}