util/nvmutil: simplify writeGbeFile()

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2023-06-02 11:52:49 +01:00
parent bdccd7cb0c
commit c9fdfce34e
2 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ int big_endian;
if ((f = open(l, p)) == -1) err(ERR(), "%s", l); \
if (fstat(f, &st) == -1) err(ERR(), "%s", l)
#define xpread(f, b, n, o, l) if (pread(f, b, n, o) == -1) err(ERR(), "%s", l)
#define handle_endianness() if (big_endian) xorswap_buf(p)
#define handle_endianness(r) if (big_endian) xorswap_buf(r)
#define xpwrite(f, b, n, o, l) if (pwrite(f, b, n, o) == -1) err(ERR(), "%s", l)
#define xclose(f, l) if (close(f) == -1) err(ERR(), "%s", l)