diff options
author | stas <stas@FreeBSD.org> | 2009-01-18 04:04:26 +0800 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2009-01-18 04:04:26 +0800 |
commit | c5bb75bfbeb3c3bb615e3971fe56d1f98bf44888 (patch) | |
tree | 2325a4099b24ae1d22aeb5749bdb8444149c5cb2 /sysutils/x86info | |
parent | 4f9720ed6e76f5eac4016c4cfc7ddebad98ee1ac (diff) | |
download | freebsd-ports-gnome-c5bb75bfbeb3c3bb615e3971fe56d1f98bf44888.tar.gz freebsd-ports-gnome-c5bb75bfbeb3c3bb615e3971fe56d1f98bf44888.tar.zst freebsd-ports-gnome-c5bb75bfbeb3c3bb615e3971fe56d1f98bf44888.zip |
- cpuctl(4) appeared in 701102. Reflect this.
Diffstat (limited to 'sysutils/x86info')
-rw-r--r-- | sysutils/x86info/Makefile | 2 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-cpuid.c | 6 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-lsmsr.c | 6 | ||||
-rw-r--r-- | sysutils/x86info/files/patch-rdmsr.c | 6 |
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) { |