diff options
author | Patrick Li <pat@FreeBSD.org> | 2001-11-23 06:25:04 +0000 |
---|---|---|
committer | Patrick Li <pat@FreeBSD.org> | 2001-11-23 06:25:04 +0000 |
commit | 7ce3de6b5af037a15b22c966acabfee562b773f5 (patch) | |
tree | 470ba773585f7e11cb7b81185b4d5c3f416e4b5d /sysutils/x86info/files/patch-x86info.c | |
parent | Update to 1.0.3 (diff) |
Update to 1.6
PR: 32187
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=50401
Diffstat (limited to 'sysutils/x86info/files/patch-x86info.c')
-rw-r--r-- | sysutils/x86info/files/patch-x86info.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/sysutils/x86info/files/patch-x86info.c b/sysutils/x86info/files/patch-x86info.c deleted file mode 100644 index a0e8551559d4..000000000000 --- a/sysutils/x86info/files/patch-x86info.c +++ /dev/null @@ -1,35 +0,0 @@ ---- x86info.c.orig Mon Oct 15 02:04:23 2001 -+++ x86info.c Mon Oct 15 02:06:27 2001 -@@ -11,6 +11,10 @@ - #include <string.h> - #include <stdlib.h> - #include <unistd.h> -+#ifndef linux -+#include <sys/types.h> -+#include <sys/sysctl.h> -+#endif - #include "x86info.h" - - int show_msr=0; -@@ -89,7 +93,21 @@ - return(0); - } - -+#if defined _SC_NPROCESSORS /* linux */ - nrCPUs = sysconf (_SC_NPROCESSORS_CONF); -+#elif defined HW_NCPU /* bsd */ -+ { -+ int mib[2] = { CTL_HW, HW_NCPU }; -+ size_t len; -+ -+ len = sizeof(nrCPUs); -+ sysctl(mib, 2, &nrCPUs, &len, NULL, 0); -+ } -+#else -+ /* unknown interface to count cpu's */ -+ nrCPUs=1; -+#endif -+ - printf ("Found %d CPU", nrCPUs); - if (nrCPUs > 1) - printf ("s"); |