summaryrefslogtreecommitdiff
path: root/util/flashrom/flashrom.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2007-05-23 18:24:58 +0000
committerStefan Reinauer <stepan@openbios.org>2007-05-23 18:24:58 +0000
commita18501dae89c0ede2a208f8f72449e2357d2c88b (patch)
treebf8ac969fd9b3f08b0d47e71988c8fa1fc138b7a /util/flashrom/flashrom.c
parentf8eea5cd1c641495bdc635e61575597a82629ef8 (diff)
Unify mmap error messages in flashrom (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2690 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flashrom.c')
-rw-r--r--util/flashrom/flashrom.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c
index cd97dda0f1..a05def76b3 100644
--- a/util/flashrom/flashrom.c
+++ b/util/flashrom/flashrom.c
@@ -116,15 +116,16 @@ struct flashchip *probe_flash(struct flashchip *flash)
#ifdef TS5300
// FIXME: Wrong place for this decision
+ // FIXME: This should be autodetected. It is trivial.
flash_baseaddr = 0x9400000;
#else
flash_baseaddr = (0xffffffff - size + 1);
#endif
/* If getpagesize() > size ->
- * `Error MMAP /dev/mem: Invalid argument'
+ * "Can't mmap memory using /dev/mem: Invalid argument"
* This should never happen as we don't support any flash chips
- * smaller than 4k or 8k yet.
+ * smaller than 4k or 8k (yet).
*/
if (getpagesize() > size) {
@@ -136,7 +137,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
bios = mmap(0, size, PROT_WRITE | PROT_READ, MAP_SHARED,
fd_mem, (off_t) flash_baseaddr);
if (bios == MAP_FAILED) {
- perror("Error: Can't mmap " MEM_DEV ".");
+ perror("Can't mmap memory using " MEM_DEV);
exit(1);
}
flash->virtual_memory = bios;