diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-02-23 13:30:15 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-02-23 13:30:15 +0000 |
| commit | 8cf2558a6f26daf4afaf886044ce1606c90959e8 (patch) | |
| tree | 662f5c1ee025efd95b7d78309339217e15a5100e /util | |
| parent | 50de561ac4837edfa81abd36df0bae2ecb62bc20 (diff) | |
nvmutil: don't hardcode errno to ECANCELED
use the ERR macro instead, so that an existing value
will not be overridden. this is useful for debugging.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 360febca..8ba669ce 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -88,7 +88,7 @@ main(int argc, char *argv[]) fprintf(stderr, " %s FILE copy 0|1\n", argv[0]); fprintf(stderr, " %s FILE brick 0|1\n", argv[0]); fprintf(stderr, " %s FILE setchecksum 0|1\n", argv[0]); - err(errno = ECANCELED, "Too few arguments"); + err(ERR(), "Too few arguments"); } filename = argv[1]; @@ -187,7 +187,7 @@ openFiles(const char *path) partsize = st.st_size >> 1; break; default: - err(errno = ECANCELED, "Invalid file size (not 8/16/128KiB)"); + err(ERR(), "Invalid file size (not 8/16/128KiB)"); break; } @@ -415,7 +415,7 @@ goodChecksum(int partnum) return 1; fprintf(stderr, "WARNING: BAD checksum in part %d\n", partnum); - errno = ECANCELED; + ERR(); return 0; } |
