mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 22:49:30 +02:00
util/nvmutil: remove SIZE_8KB define
use SIZE_4KB << 1 when needing 8KB size Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -36,7 +36,6 @@ void writeGbeFile(void);
|
|||||||
#define MAC_ADDRESS argv[3]
|
#define MAC_ADDRESS argv[3]
|
||||||
#define PARTNUM argv[3]
|
#define PARTNUM argv[3]
|
||||||
#define SIZE_4KB 0x1000
|
#define SIZE_4KB 0x1000
|
||||||
#define SIZE_8KB 0x2000
|
|
||||||
|
|
||||||
uint16_t buf16[SIZE_4KB], mac[3] = {0, 0, 0};
|
uint16_t buf16[SIZE_4KB], mac[3] = {0, 0, 0};
|
||||||
uint8_t *buf = (uint8_t *) &buf16;
|
uint8_t *buf = (uint8_t *) &buf16;
|
||||||
@@ -113,7 +112,7 @@ openFiles(const char *path)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
xopen(fd, path, flags);
|
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);
|
err(errno = ECANCELED, "File `%s` not 8KiB", path);
|
||||||
xopen(rfd, "/dev/urandom", O_RDONLY);
|
xopen(rfd, "/dev/urandom", O_RDONLY);
|
||||||
errno = errno != ENOTDIR ? errno : 0;
|
errno = errno != ENOTDIR ? errno : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user