mboxd_flash: strerror() requires errno for argument
Change-Id: I68381ed74ab8b75dac195b53d61fd8ccabcf6fb1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/mboxd_flash.c b/mboxd_flash.c
index a7e632a..7ef834a 100644
--- a/mboxd_flash.c
+++ b/mboxd_flash.c
@@ -147,8 +147,8 @@
size_read = read(context->fds[MTD_FD].fd, mem,
min_u32(CHUNKSIZE, size));
if (size_read < 0) {
- MSG_ERR("Couldn't copy mtd into ram: %d. %s\n",
- size_read, strerror(size_read));
+ MSG_ERR("Couldn't copy mtd into ram: %s\n",
+ strerror(errno));
return -MBOX_R_SYSTEM_ERROR;
}