util/nvmutil: additional flag check on write

gbe_write already checks this, but we should
also check inside the caller.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-08 15:10:38 +00:00
parent b5054f68ba
commit 08de8d98e9
+1 -1
View File
@@ -295,7 +295,7 @@ main(int argc, char *argv[])
if (errno)
err(errno, "Unhandled error: will not write file: %s", fname);
else
else if (gbe_flags != O_RDONLY)
write_gbe_file();
if (close(gbe_fd) == -1)