From 9a92524a47fa9d1c5102ead99250a86b1a635866 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 18 Sep 2023 16:36:45 +0100 Subject: util/nvmutil: remove SIZE_8KB define use SIZE_4KB << 1 when needing 8KB size Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 7be2b08a..0d0471af 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -36,7 +36,6 @@ void writeGbeFile(void); #define MAC_ADDRESS argv[3] #define PARTNUM argv[3] #define SIZE_4KB 0x1000 -#define SIZE_8KB 0x2000 uint16_t buf16[SIZE_4KB], mac[3] = {0, 0, 0}; uint8_t *buf = (uint8_t *) &buf16; @@ -113,7 +112,7 @@ openFiles(const char *path) { struct stat st; xopen(fd, path, flags); - if ((st.st_size != SIZE_8KB)) + if ((st.st_size != (SIZE_4KB << 1))) err(errno = ECANCELED, "File `%s` not 8KiB", path); xopen(rfd, "/dev/urandom", O_RDONLY); errno = errno != ENOTDIR ? errno : 0; -- cgit v1.2.1