flashrom: remove broken msr path change

This almost caused a nasty accident on my Geos — without the MSR access
it managed to erase *most* of the flash and write the new image, but
didn't manage to change the last few KiB. Thankfully I'd already taken a
copy of the old contents, and could flash them back.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@34832 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2012-12-21 18:25:40 +00:00
parent 6ee6a614d8
commit a24e1e9e27
2 changed files with 1 additions and 22 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=flashrom
PKG_VERSION:=0.9.4
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.flashrom.org/releases

View File

@ -1,21 +0,0 @@
--- a/physmap.c
+++ b/physmap.c
@@ -352,7 +352,7 @@ int setup_cpu_msr(int cpu)
{
char msrfilename[64];
memset(msrfilename, 0, sizeof(msrfilename));
- snprintf(msrfilename, sizeof(msrfilename), "/dev/cpu/%d/msr", cpu);
+ snprintf(msrfilename, sizeof(msrfilename), "/dev/msr%d", cpu);
if (fd_msr != -1) {
msg_pinfo("MSR was already initialized\n");
@@ -362,7 +362,8 @@ int setup_cpu_msr(int cpu)
fd_msr = open(msrfilename, O_RDWR);
if (fd_msr < 0) {
- perror("Error while opening /dev/cpu/0/msr");
+ fprintf(stderr, "Error while opening %s: %s\n", msrfilename,
+ strerror(errno));
msg_pinfo("Did you run 'modprobe msr'?\n");
return -1;
}