[coreboot-gerrit] Change in coreboot[master]: intelmetool: Print strerror() results for mmap errors
Paul Wise (Debian) (Code Review)
gerrit at coreboot.org
Thu May 4 08:15:06 CEST 2017
Paul Wise (Debian) has uploaded a new change for review. ( https://review.coreboot.org/19560 )
Change subject: intelmetool: Print strerror() results for mmap errors
......................................................................
intelmetool: Print strerror() results for mmap errors
These are more human readable for folks not familiar with errno values.
Change-Id: I21352a00b583163472ccd3302a83adf1f8396c61
Signed-off-by: Paul Wise <pabs3 at bonedaddy.net>
---
M util/intelmetool/mmap.c
1 file changed, 5 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/19560/1
diff --git a/util/intelmetool/mmap.c b/util/intelmetool/mmap.c
index 041aac9..2462b22 100644
--- a/util/intelmetool/mmap.c
+++ b/util/intelmetool/mmap.c
@@ -15,6 +15,7 @@
#include "mmap.h"
#include <errno.h>
+#include <string.h>
#ifndef __DARWIN__
int fd_mem;
@@ -28,8 +29,8 @@
if (virt_addr == MAP_FAILED) {
err = errno;
- printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d\n",
- (intmax_t)phys_addr, len, err);
+ printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n",
+ (intmax_t)phys_addr, len, err, strerror(err));
return NULL;
}
@@ -44,8 +45,8 @@
if (virt_addr == MAP_FAILED) {
err = errno;
- printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d\n",
- (intmax_t)phys_addr, len, err);
+ printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n",
+ (intmax_t)phys_addr, len, err, strerror(err));
return NULL;
}
--
To view, visit https://review.coreboot.org/19560
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I21352a00b583163472ccd3302a83adf1f8396c61
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Paul Wise (Debian) <pabs at debian.org>
More information about the coreboot-gerrit
mailing list