[coreboot] r3907 - trunk/util/flashrom

svn at coreboot.org svn at coreboot.org
Mon Jan 26 03:04:20 CET 2009


Author: stuge
Date: 2009-01-26 03:04:19 +0100 (Mon, 26 Jan 2009)
New Revision: 3907

Modified:
   trunk/util/flashrom/physmap.c
Log:
flashrom: exit(2) on /dev/mem open() failure and exit(3) on mmap() failure.

Signed-off-by: Peter Stuge <peter at stuge.se>
Acked-by: Ward Vandewege <ward at gnu.org>


Modified: trunk/util/flashrom/physmap.c
===================================================================
--- trunk/util/flashrom/physmap.c	2009-01-26 01:33:02 UTC (rev 3906)
+++ trunk/util/flashrom/physmap.c	2009-01-26 02:04:19 UTC (rev 3907)
@@ -57,7 +57,7 @@
 		/* 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 @@
 			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;





More information about the coreboot mailing list