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 a5549b43f8
commit a0d7c564fb
1 changed files with 1 additions and 1 deletions

View File

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