summaryrefslogtreecommitdiffstats
path: root/perl-install/c/smp-dmi.c
diff options
context:
space:
mode:
authorNicolas Planel <nplanel@mandriva.com>2003-02-26 10:51:13 +0000
committerNicolas Planel <nplanel@mandriva.com>2003-02-26 10:51:13 +0000
commit2d5854c65795062a91709aa77fd20b5599859c50 (patch)
tree28f372e566390a0badb3df8da28c2f129cc7704f /perl-install/c/smp-dmi.c
parent0c7d9ac551d9cae3c1d976a163b72b2618690dfa (diff)
downloaddrakx-2d5854c65795062a91709aa77fd20b5599859c50.tar
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.gz
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.bz2
drakx-2d5854c65795062a91709aa77fd20b5599859c50.tar.xz
drakx-2d5854c65795062a91709aa77fd20b5599859c50.zip
Two smp detection for intel arch
Diffstat (limited to 'perl-install/c/smp-dmi.c')
-rw-r--r--perl-install/c/smp-dmi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/perl-install/c/smp-dmi.c b/perl-install/c/smp-dmi.c
index 518163c75..672bc2c35 100644
--- a/perl-install/c/smp-dmi.c
+++ b/perl-install/c/smp-dmi.c
@@ -159,8 +159,7 @@ static int dmi_table(int fd, u32 base, int len, int num)
dm=(struct dmi_header *)data;
if((dm->type == 4) && /*"Central Processor"*/(data[5] == 3)) {
- if(/*Processor Manufacturer*/(data[7] != 0) &&
- (strncmp(dmi_processor_family(data[6]),"Unknown",7) != 0) && (data[6] != 0))
+ if(/*Processor Manufacturer*/data[7] != 0)
processor++;
}
@@ -174,11 +173,6 @@ static int dmi_table(int fd, u32 base, int len, int num)
return processor;
}
-int main(int argc, char *argv[])
-{
- return intelDetectSMP();
-}
-
int intelDetectSMP(void) {
unsigned char buf[20];
int fd=open("/dev/mem", O_RDONLY);
@@ -215,5 +209,5 @@ int intelDetectSMP(void) {
}
}
close(fd);
- return processor;
+ return (processor > 1);
}