packages/utils/flashrom/patches/001-msr_dev_path.patch
swalker 954df953c7 [packages] flashrom: update source url, use PKG_INSTALL & MAKE_FLAGS, refresh patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@27223 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-19 17:09:32 +00:00

22 lines
666 B
Diff

--- 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;
}