util/nvmutil: don't say write not needed if errno

otherwise, the output is confusing

Signed-off-by: Leah Rowe <leah@libreboot.org>
master
Leah Rowe 2025-01-27 05:54:06 +00:00
parent 6841a351eb
commit a08748a9ed
1 changed files with 1 additions and 1 deletions

View File

@ -470,7 +470,7 @@ writeGbe(void)
cmd_dump(); cmd_dump();
} }
if ((!tnw) && (flags != O_RDONLY)) if ((!tnw) && (flags != O_RDONLY) && (!errno))
fprintf(stderr, "No changes needed on file '%s'\n", filename); fprintf(stderr, "No changes needed on file '%s'\n", filename);
else if (tnw) else if (tnw)
printf("%ld bytes written to file '%s'\n", tnw, filename); printf("%ld bytes written to file '%s'\n", tnw, filename);