summaryrefslogtreecommitdiff
path: root/util/flashrom/flash_rom.c
diff options
context:
space:
mode:
authorAdam Kaufman <adam.kaufman@pinnacle.com>2007-02-06 19:47:50 +0000
committerStefan Reinauer <stepan@openbios.org>2007-02-06 19:47:50 +0000
commit4f9cf1373c6b9431fd6b84571237a8dee2ab93cd (patch)
tree7abc7233f1d7f2d74d6fefe892d98a1e95753ae7 /util/flashrom/flash_rom.c
parentbc7ceb1fd1473f0338fee8140356f130d0b615ba (diff)
This patch is a rework of Adam Kaufman's Solaris patch.
* flash.h: - add a license header - add system definitions * flash_enable.c: - put io priviledge access in one single place - add includes required for Solaris. * lbtable.c, flash_rom.c, 82802ab.c: - use MEM_DEV so it works on Solaris * sst49lfxxxc.c, sharplhf00l04.c, sst_fwhub.c, 82802ab.c - drop unneeded include to sys/io.h * Makefile - adapt to Solaris specifics. Signed-off-by: Adam Kaufman <adam.kaufman@pinnacle.com> Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Adam Kaufman <adam.kaufman@pinnacle.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2550 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/flashrom/flash_rom.c')
-rw-r--r--util/flashrom/flash_rom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/flashrom/flash_rom.c b/util/flashrom/flash_rom.c
index b1ca7b3466..ac530d08b6 100644
--- a/util/flashrom/flash_rom.c
+++ b/util/flashrom/flash_rom.c
@@ -52,8 +52,8 @@ struct flashchip *probe_flash(struct flashchip *flash)
volatile uint8_t *bios;
unsigned long size;
- if ((fd_mem = open("/dev/mem", O_RDWR)) < 0) {
- perror("Error: Can not open /dev/mem. You need to be root.");
+ if ((fd_mem = open(MEM_DEV, O_RDWR)) < 0) {
+ perror("Error: Can not access memory using " MEM_DEV ". You need to be root.");
exit(1);
}