diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-12 15:22:13 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-12 15:22:13 +0100 |
commit | 3162d60d5270412506c076749d65221fa6276f1f (patch) | |
tree | ed00dfd2490f1eda746b7d3ce65bf2c5e8ea28de /util/nvmutil | |
parent | f989360e88ab45bb20dd0415cc145f7d3ef42ee5 (diff) |
nvmutil: don't reset errno before write
under the current logic, errno would be ECANCELED
if neither checksum is valid, or I/O related if
pwrite fails; alternatively, the for loop exits
and the file has been written, where it is quite
correctly reset already.
ergo, the errno reset at the start of
writeGbeFile is superfluous. remove this bloat.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r-- | util/nvmutil/nvmutil.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index fe0df3d..e99c6ad 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -261,7 +261,6 @@ xorswap_buf(int partnum) void writeGbeFile(void) { - errno = 0; err_if((cmd == writeGbeFile) && !(validChecksum(0) || validChecksum(1))); for (int p = 0, x = (cmd == writeGbeFile) ? 1 : 0; p < 2; p++) { if ((!nvmPartModified[p]) && (cmd != writeGbeFile)) |