util/nvmutil: consolidated error message

fsdg20230625
Leah Rowe 2023-04-06 00:56:17 +01:00
parent 0d98d73870
commit a0bc61f9de
1 changed files with 1 additions and 2 deletions

View File

@ -164,8 +164,7 @@ readGbeFile(int *fd, const char *path, int flags, size_t nr)
if (fstat((*fd), &st) == -1) if (fstat((*fd), &st) == -1)
err(errno, "%s", path); err(errno, "%s", path);
if ((st.st_size != SIZE_8KB)) { if ((st.st_size != SIZE_8KB)) {
fprintf(stderr, "%s: Bad file size (must be 8KiB)\n", path); err(errno = ECANCELED, "File \"%s\" not of size 8KiB", path);
err(errno = ECANCELED, NULL);
} }
if (errno == ENOTDIR) if (errno == ENOTDIR)