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, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index acaf5a98..b5f4e864 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -142,7 +142,7 @@ readFromFile(int *fd, uint8_t *buf, const char *path, int flags, size_t size)
return -1;
} else if (size == SIZE_8KB) {
fstat((*fd), &st);
- if (st.st_size != SIZE_8KB) {
+ if ((st.st_size != SIZE_8KB) && strcmp(path, "/dev/urandom")) {
fprintf(stderr, "Bad file size\n");
errno = ECANCELED;
return -1;