diff options
author | Peter Stuge <peter@stuge.se> | 2009-01-26 02:04:19 +0000 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2009-01-26 02:04:19 +0000 |
commit | 43438ba7d17139cc4143fd3840be8d4b39f0ea01 (patch) | |
tree | a64915977ca685745d4867a3d42bdbeba0fa6f80 | |
parent | 33fefcad5cffa8636b03654f64abd4f500c7f6a8 (diff) | |
download | flashrom-43438ba7d17139cc4143fd3840be8d4b39f0ea01.tar.gz flashrom-43438ba7d17139cc4143fd3840be8d4b39f0ea01.tar.bz2 flashrom-43438ba7d17139cc4143fd3840be8d4b39f0ea01.zip |
exit(2) on /dev/mem open() failure and exit(3) on mmap() failure
Corresponding to flashrom svn r401 and coreboot v2 svn r3907.
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>
-rw-r--r-- | physmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |