aboutsummaryrefslogtreecommitdiff
path: root/sysutils/x86info
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2009-01-17 20:04:26 +0000
committerStanislav Sedov <stas@FreeBSD.org>2009-01-17 20:04:26 +0000
commit2a518ec7fd791859a0561734a73593f359db34a7 (patch)
tree8baacd6e0cd7076f0e99c749dab79a2bffb69090 /sysutils/x86info
parentfe3937453998f3f0ce470a487b0463389cbc29e2 (diff)
Notes
Diffstat (limited to 'sysutils/x86info')
-rw-r--r--sysutils/x86info/Makefile2
-rw-r--r--sysutils/x86info/files/patch-cpuid.c6
-rw-r--r--sysutils/x86info/files/patch-lsmsr.c6
-rw-r--r--sysutils/x86info/files/patch-rdmsr.c6
4 files changed, 10 insertions, 10 deletions
diff --git a/sysutils/x86info/Makefile b/sysutils/x86info/Makefile
index a9daa7ba3fee..0a1c5c40c7fb 100644
--- a/sysutils/x86info/Makefile
+++ b/sysutils/x86info/Makefile
@@ -25,7 +25,7 @@ MAN8= lsmsr.8
MAKE_ARGS= CFLAGS="${CFLAGS}"
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 800042
+.if ${OSVERSION} < 701102
BUILD_DEPENDS+= ${LOCALBASE}/include/cpu.h:${PORTSDIR}/sysutils/devcpu
CFLAGS+= -I"${LOCALBASE}"/include
.endif
diff --git a/sysutils/x86info/files/patch-cpuid.c b/sysutils/x86info/files/patch-cpuid.c
index e2444f6b54d5..e4dd7e1b8ea7 100644
--- a/sysutils/x86info/files/patch-cpuid.c
+++ b/sysutils/x86info/files/patch-cpuid.c
@@ -7,7 +7,7 @@
+# include <sys/param.h>
# include <sys/ioctl.h>
-# include <cpu.h>
-+# if __FreeBSD_version < 800042
++# if __FreeBSD_version < 701102
+# define CPUDEV "/dev/cpu%d"
+# include <cpu.h>
+# else
@@ -45,7 +45,7 @@
char cpuname[20];
unsigned char buffer[16];
int fh;
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
cpu_cpuid_args_t args;
+#else
+ cpuctl_cpuid_args_t args;
@@ -61,7 +61,7 @@
+ (void)snprintf(cpuname,18, CPUDEV, CPU_number);
fh = open(cpuname, O_RDONLY);
if (fh != -1) {
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
if (ioctl(fh, CPU_CPUID, &args) != 0) {
+#else
+ if (ioctl(fh, CPUCTL_CPUID, &args) != 0) {
diff --git a/sysutils/x86info/files/patch-lsmsr.c b/sysutils/x86info/files/patch-lsmsr.c
index d579497bd3f1..228af6e7a73b 100644
--- a/sysutils/x86info/files/patch-lsmsr.c
+++ b/sysutils/x86info/files/patch-lsmsr.c
@@ -7,7 +7,7 @@
+#if defined(__FreeBSD__)
+# include <sys/param.h>
+# include <sys/ioctl.h>
-+# if __FreeBSD_version < 800042
++# if __FreeBSD_version < 701102
+# define CPUDEV "/dev/cpu%d"
+# include <cpu.h>
+# else
@@ -27,14 +27,14 @@
+
+int get_msr_val(unsigned int msr, unsigned long long *val)
+{
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
+ cpu_msr_args_t args;
+#else
+ cpuctl_msr_args_t args;
+#endif
+
+ args.msr = msr;
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
+ if (ioctl(g.fd, CPU_RDMSR, &args) != 0) {
+#else
+ if (ioctl(g.fd, CPUCTL_RDMSR, &args) != 0) {
diff --git a/sysutils/x86info/files/patch-rdmsr.c b/sysutils/x86info/files/patch-rdmsr.c
index b2895a4e7485..35df42cb6774 100644
--- a/sysutils/x86info/files/patch-rdmsr.c
+++ b/sysutils/x86info/files/patch-rdmsr.c
@@ -7,7 +7,7 @@
+# include <sys/param.h>
# include <sys/ioctl.h>
-# include <cpu.h>
-+# if __FreeBSD_version < 800042
++# if __FreeBSD_version < 701102
+# define CPUDEV "/dev/cpu%d"
+# include <cpu.h>
+# else
@@ -21,7 +21,7 @@
unsigned long lo, hi;
int fh;
static int nodriver=0;
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
cpu_msr_args_t args;
+#else
+ cpuctl_msr_args_t args;
@@ -40,7 +40,7 @@
args.msr = idx;
- if (ioctl(fh, CPU_RDMSR, &args) != 0) {
-+#if __FreeBSD_version < 800042
++#if __FreeBSD_version < 701102
+ if (ioctl(fh, CPU_RDMSR, &args) != 0) {
+#else
+ if (ioctl(fh, CPUCTL_RDMSR, &args) != 0) {