summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ioops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ioops.c b/ioops.c
index a5dc94a..7cec2fd 100644
--- a/ioops.c
+++ b/ioops.c
@@ -102,7 +102,7 @@ int read_blob_or_die(const char *file, void *blob, size_t count)
int fd, ret;
fd = open_or_die(file, O_RDONLY);
- ret = read_or_die(fd, blob, len);
+ ret = read_or_die(fd, blob, count);
close(fd);
return ret;
@@ -113,7 +113,7 @@ int write_blob_or_die(const char *file, const void *blob, size_t count)
int fd, ret;
fd = open_or_die_m(file, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
- ret = write_or_die(fd, blob, len);
+ ret = write_or_die(fd, blob, count);
fdatasync(fd);
close(fd);