summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>2017-02-23 12:10:09 +1100
committerPatrick Williams <patrick@stwcx.xyz>2017-03-09 21:55:41 +0000
commit1974c6f9e61fb194580b1874b3e88f612e5c4ba6 (patch)
tree2e02fb8d3d7f5f0858f137e13ac448a30e65b2da
parent57b0bca4c9253457407fcc417e2ebe6d5b18f183 (diff)
downloadphosphor-mboxd-1974c6f9e61fb194580b1874b3e88f612e5c4ba6.tar.gz
phosphor-mboxd-1974c6f9e61fb194580b1874b3e88f612e5c4ba6.zip
mboxd: Fix MBOX_C_GET_FLASH_INFO to return size specified on command line
The MBOX_C_GET_FLASH_INFO command is supposed to return the size of the file which was specified by the "flash" option on the command line. However currently the actual size of the flash chip its self is being reported. Fix the MBOX_C_GET_FLASH_INFO command to correctly return the size of the file rather than the whole flash size. Change-Id: Ic7425dde8eca187a85e9bcec4084d5abc501c8da Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
-rw-r--r--mboxd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mboxd.c b/mboxd.c
index 8fdcc2d..8503b49 100644
--- a/mboxd.c
+++ b/mboxd.c
@@ -224,7 +224,7 @@ static int dispatch_mbox(struct mbox_context *context)
}
break;
case MBOX_C_GET_FLASH_INFO:
- put_u32(&resp.msg.data[0], context->mtd_info.size);
+ put_u32(&resp.msg.data[0], context->flash_size);
put_u32(&resp.msg.data[4], context->mtd_info.erasesize);
resp.msg.response = MBOX_R_SUCCESS;
break;
OpenPOWER on IntegriCloud