util/nvmutil: more human-friendly exit messages

fsdg20230625
Leah Rowe 2022-11-18 20:07:13 +00:00
parent 501745630b
commit 6c12afa996
1 changed files with 3 additions and 1 deletions

View File

@ -105,6 +105,8 @@ main(int argc, char *argv[])
errno = 0; errno = 0;
if (pwrite(fd, gbe, SIZE_8KB, 0) == SIZE_8KB) if (pwrite(fd, gbe, SIZE_8KB, 0) == SIZE_8KB)
close(fd); close(fd);
if (errno == 0)
printf("%s successfully modified\n", FILENAME);
} }
} }
@ -286,7 +288,7 @@ validChecksum(int partnum)
total += word(w, partnum); total += word(w, partnum);
if (total != 0xBABA) { if (total != 0xBABA) {
fprintf(stderr, "BAD checksum in part %d\n", partnum); fprintf(stderr, "WARNING: BAD checksum in part %d\n", partnum);
errno = ECANCELED; errno = ECANCELED;
return 0; return 0;
} }