diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-10-12 11:13:06 -0500 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2017-11-21 03:31:50 +0000 |
commit | 0a2cc9550a1e70c035fe829d2ac32dd52322ebd6 (patch) | |
tree | 26b4a7e8480020030f8275baf313f292e81c92b0 /mboxd_flash_virtual.cpp | |
parent | 6c3ccf8c679e52aa50fadff9120abeb5f94ca747 (diff) | |
download | phosphor-mboxd-0a2cc9550a1e70c035fe829d2ac32dd52322ebd6.tar.gz phosphor-mboxd-0a2cc9550a1e70c035fe829d2ac32dd52322ebd6.zip |
mboxd_flash_virtual.cpp: Fix variable name for checking mmap rc
The return code for mmap is stored in variable mapped_mem, but
then variable mem was being checked for the return code value.
Change that to mapped_mem.
Change-Id: Ie198c78f1d404a34767d7781a2fdcc48e1724a44
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'mboxd_flash_virtual.cpp')
-rw-r--r-- | mboxd_flash_virtual.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mboxd_flash_virtual.cpp b/mboxd_flash_virtual.cpp index 26fe07a..442593b 100644 --- a/mboxd_flash_virtual.cpp +++ b/mboxd_flash_virtual.cpp @@ -164,7 +164,7 @@ int64_t copy_flash(struct mbox_context* context, uint32_t offset, void* mem, auto mapped_mem = mmap(NULL, partitionInfo->data.actual, PROT_READ, MAP_PRIVATE, roRequest.fd(), 0); - if (mem == MAP_FAILED) + if (mapped_mem == MAP_FAILED) { MSG_ERR("Failed to map partition=%s:Error=%s\n", partitionInfo->data.name, strerror(errno)); |