Author: myles Date: 2009-05-05 23:08:36 +0200 (Tue, 05 May 2009) New Revision: 462
Modified: trunk/chipset_enable.c Log: Here is a fix for chipset_enable.c when there is not /dev/cpu. Open fails so there is no reason to lseek in. Actually this is a trivial fix for a bad return value from open.
Signed-off-by: Bertrand Jacquin beber@meleeweb.net Acked-by: Ronald G. Minnich rminnich@gmail.com
Modified: trunk/chipset_enable.c =================================================================== --- trunk/chipset_enable.c 2009-05-05 16:34:53 UTC (rev 461) +++ trunk/chipset_enable.c 2009-05-05 21:08:36 UTC (rev 462) @@ -511,7 +511,7 @@ unsigned char buf[8];
fd_msr = open("/dev/cpu/0/msr", O_RDWR); - if (!fd_msr) { + if (fd_msr == -1) { perror("open msr"); return -1; }