mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: use err() more consistently
This commit is contained in:
@@ -50,6 +50,7 @@ void setWord(int pos16, int partnum, uint16_t val);
|
||||
void byteswap(uint8_t *byte);
|
||||
void writeGbeFile(int *fd, const char *filename);
|
||||
|
||||
#define PROGNAME argv[0]
|
||||
#define FILENAME argv[1]
|
||||
#define COMMAND argv[2]
|
||||
#define MAC_ADDRESS argv[3]
|
||||
@@ -134,7 +135,7 @@ main(int argc, char *argv[])
|
||||
nvmutil_exit:
|
||||
if (!((errno == ECANCELED) && (flags == O_RDONLY)))
|
||||
if (errno != 0)
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
err(errno, NULL);
|
||||
|
||||
return errno;
|
||||
}
|
||||
@@ -445,7 +446,7 @@ writeGbeFile(int *fd, const char *filename)
|
||||
if (close((*fd)))
|
||||
err(errno, "%s", filename);
|
||||
if (errno != 0)
|
||||
return;
|
||||
err(errno, "%s", filename);
|
||||
|
||||
for (partnum = 0; partnum < 2; partnum++) {
|
||||
if (nvmPartModified[partnum])
|
||||
|
||||
Reference in New Issue
Block a user