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>
btrfsvols
Leah Rowe 2023-10-12 15:22:13 +01:00
parent f989360e88
commit 3162d60d52
1 changed files with 0 additions and 1 deletions

View File

@ -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))