summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2009-01-26 02:04:19 +0000
committerPeter Stuge <peter@stuge.se>2009-01-26 02:04:19 +0000
commit800621e0c5774761531c31a5f58a0e84a8878ef8 (patch)
treea7c8e4bad309af69e1818f826e34dfc2ae8e381b /util
parent0860215ab23c68cceb4f26f7b6c0e2a3f647ebcc (diff)
downloadcoreboot-800621e0c5774761531c31a5f58a0e84a8878ef8.tar.xz
flashrom: exit(2) on /dev/mem open() failure and exit(3) on mmap() failure.
Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3907 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/flashrom/physmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/flashrom/physmap.c b/util/flashrom/physmap.c
index d9fd56003a..0fb6c5ca6a 100644
--- a/util/flashrom/physmap.c
+++ b/util/flashrom/physmap.c
@@ -57,7 +57,7 @@ void *sys_physmap(unsigned long phys_addr, size_t len)
/* Open the memory device UNCACHED. Important for MMIO. */
if (-1 == (fd_mem = open(MEM_DEV, O_RDWR|O_SYNC))) {
perror("Critical error: open(" MEM_DEV ")");
- exit(1);
+ exit(2);
}
}
@@ -87,7 +87,7 @@ void *physmap(const char *descr, unsigned long phys_addr, size_t len)
fprintf(stderr, "You can override CONFIG_X86_PAT at boot with the nopat kernel parameter but\n");
fprintf(stderr, "disabling the other option unfortunately requires a kernel recompile. Sorry!\n");
}
- exit(1);
+ exit(3);
}
return virt_addr;