summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-04-20 18:49:01 +0000
committerBill Nottingham <notting@redhat.com>2005-04-20 18:49:01 +0000
commit47a82590b28a8849ddb14b937d142dc7ada27571 (patch)
treee63563c6093335394e25ad0f63b1676bad52b822
parent99804a7408d556484cd967d002db17a7b9009e8f (diff)
downloadinitscripts-47a82590b28a8849ddb14b937d142dc7ada27571.tar.gz
initscripts-47a82590b28a8849ddb14b937d142dc7ada27571.tar.xz
initscripts-47a82590b28a8849ddb14b937d142dc7ada27571.zip
tweak
-rw-r--r--src/redhat-support-check.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/redhat-support-check.c b/src/redhat-support-check.c
index 9584579e..1d41fdb0 100644
--- a/src/redhat-support-check.c
+++ b/src/redhat-support-check.c
@@ -76,12 +76,12 @@ unsigned int get_num_cpus() {
}
}
if (ebx==0x68747541 && edx==0x69746e65 && ecx==0x444d4163) {
- int nsibs;
-
cpuid(1, &eax, &ebx, &ecx, &edx);
- nsibs = (ebx & 0xff0000) >> 16;
- if (nsibs == 0) nsibs = 1;
- return ncpus / nsibs;
+ if (edx & (1 << 28)) { /* has HT */
+ int nsibs = (ebx & 0xff0000) >> 16;
+ if (nsibs == 0) nsibs = 1;
+ return ncpus / nsibs;
+ }
}
#endif
return ncpus;