From 064b1f23fa507878bddca3c308e5e6034b06c998 Mon Sep 17 00:00:00 2001 From: Adam Kaufman Date: Tue, 6 Feb 2007 19:47:50 +0000 Subject: 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. Corresponding to flashrom svn r88 and coreboot v2 svn r2550. Signed-off-by: Adam Kaufman Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer Acked-by: Adam Kaufman --- flash_rom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'flash_rom.c') diff --git a/flash_rom.c b/flash_rom.c index b1ca7b34..ac530d08 100644 --- a/flash_rom.c +++ b/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); } -- cgit v1.2.3