[PATCH 3/3] bios: ebdadump: fwts_mmap failure is FWTS_MAP_FAILED and not MAP_FAILED

Colin King colin.king at canonical.com
Wed Dec 23 01:42:52 UTC 2015


From: Colin Ian King <colin.king at canonical.com>

Should be checking for FWTS_MAP_FAILED on a failed fwts_mmap and not
MAP_FAILED

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/bios/ebdadump/ebdadump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bios/ebdadump/ebdadump.c b/src/bios/ebdadump/ebdadump.c
index 6b189eb..7a8dc79 100644
--- a/src/bios/ebdadump/ebdadump.c
+++ b/src/bios/ebdadump/ebdadump.c
@@ -56,7 +56,7 @@ static int ebdadump_test1(fwts_framework *fw)
 		return FWTS_ERROR;
 	}
 
-        if ((mem = fwts_mmap(ebda_addr, len)) == MAP_FAILED) {
+        if ((mem = fwts_mmap(ebda_addr, len)) == FWTS_MAP_FAILED) {
 		fwts_log_error(fw, "Cannot mmap BIOS ROM region.");
 		return FWTS_ERROR;
 	}
-- 
2.6.4




More information about the fwts-devel mailing list