mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: reset errno when writing a MAC
if checksum verification passed, then we should reset in case we're operating on a given part and the last one checked was bad. a catch-all reset is already performed in writeGbe, but it's good to do it here too. in practise, if the 2nd part (part 1) is what failed, errno still wouldn't be reset. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -251,6 +251,7 @@ cmd_setmac(void)
|
||||
for (int partnum = 0; partnum < 2; partnum++) {
|
||||
if (!goodChecksum(part = partnum))
|
||||
continue;
|
||||
errno = 0;
|
||||
|
||||
for (int w = 0; w < 3; w++) /* write MAC to gbe part */
|
||||
setWord(w, partnum, mac[w]);
|
||||
|
||||
Reference in New Issue
Block a user