summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 13fce715..76ad14ce 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -427,27 +427,27 @@ writeGbe(void)
if ((!gbeFileChanged) || (flags == O_RDONLY))
return;
- ssize_t tbw = 0; /* total bytes written */
+ ssize_t tnw = 0; /* total bytes written */
for (int p = 0; p < 2; p++) {
if ((!nvmPartChanged[p]))
continue;
swap(p); /* swap bytes on big-endian host CPUs */
- ssize_t bw = pwrite(fd, (uint8_t *) gbe[p], nf, p * partsize);
- err_if(bw == -1);
- if (bw != nf)
+ ssize_t nw = pwrite(fd, (uint8_t *) gbe[p], nf, p * partsize);
+ err_if(nw == -1);
+ if (nw != nf)
err(errno == ECANCELED,
"%ld bytes written on '%s', expected %ld bytes\n",
- bw, filename, nf);
+ nw, filename, nf);
- tbw += nf;
+ tnw += nf;
}
- if ((!tbw) && (gbeFileChanged))
+ if ((!tnw) && (gbeFileChanged))
fprintf(stderr, "No changes needed on file '%s'\n", filename);
- else if (tbw)
- printf("%ld bytes written to file '%s'\n", tbw, filename);
+ else if (tnw)
+ printf("%ld bytes written to file '%s'\n", tnw, filename);
errno = 0;
err_if(close(fd) == -1);