commit
da0987507c
|
@ -42,9 +42,27 @@ static char *cpuname_lower[] = {
|
||||||
|
|
||||||
int detect(void)
|
int detect(void)
|
||||||
{
|
{
|
||||||
// return CPU_GENERIC;
|
FILE *infile;
|
||||||
return CPU_Z13;
|
char buffer[512], *p;
|
||||||
|
|
||||||
|
p = (char *)NULL;
|
||||||
|
infile = fopen("/proc/sysinfo", "r");
|
||||||
|
while (fgets(buffer, sizeof(buffer), infile)){
|
||||||
|
if (!strncmp("Type", buffer, 4)){
|
||||||
|
p = strchr(buffer, ':') + 2;
|
||||||
|
#if 0
|
||||||
|
fprintf(stderr, "%s\n", p);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(infile);
|
||||||
|
|
||||||
|
if (strstr(p, "2964")) return CPU_Z13;
|
||||||
|
if (strstr(p, "2965")) return CPU_Z13;
|
||||||
|
|
||||||
|
return CPU_GENERIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_libname(void)
|
void get_libname(void)
|
||||||
|
|
Loading…
Reference in New Issue