nvmutil: reset errno on successful write

previously, a bad checksum would have caused a non-zero
exit, even if the other checksum was correct (observed
when using the swap command)

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-10-12 15:17:47 +01:00
parent 3ad171fd3d
commit f989360e88
1 changed files with 1 additions and 0 deletions

View File

@ -269,5 +269,6 @@ writeGbeFile(void)
handle_endianness(p^x);
err_if(pwrite(fd, (uint8_t *) gbe[p^x], nf, p << 12) == -1);
}
errno = 0;
err_if(close(fd) == -1);
}