summaryrefslogtreecommitdiff
path: root/usr.bin/mkimg/image.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mkimg/image.c')
-rw-r--r--usr.bin/mkimg/image.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mkimg/image.c b/usr.bin/mkimg/image.c
index be1c2e9fcbb2..a3bec6350e82 100644
--- a/usr.bin/mkimg/image.c
+++ b/usr.bin/mkimg/image.c
@@ -517,14 +517,14 @@ image_copyout_memory(int fd, size_t size, void *ptr)
return (0);
}
-static int
-image_copyout_zeroes(int fd, size_t size)
+int
+image_copyout_zeroes(int fd, size_t count)
{
static uint8_t *zeroes = NULL;
size_t sz;
int error;
- if (lseek(fd, (off_t)size, SEEK_CUR) != -1)
+ if (lseek(fd, (off_t)count, SEEK_CUR) != -1)
return (0);
/*
@@ -537,12 +537,12 @@ image_copyout_zeroes(int fd, size_t size)
return (ENOMEM);
}
- while (size > 0) {
- sz = (size > secsz) ? secsz : size;
+ while (count > 0) {
+ sz = (count > secsz) ? secsz : count;
error = image_copyout_memory(fd, sz, zeroes);
if (error)
return (error);
- size -= sz;
+ count -= sz;
}
return (0);
}