mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-24 02:13:27 +08:00
Fixed cpu name extraction for big.LITTLE configurations
This commit is contained in:
parent
5e251cf478
commit
6320a07d17
@ -1691,6 +1691,9 @@ const char* getCpuName()
|
||||
// trim ending
|
||||
while(strlen(tmp) && tmp[strlen(tmp)-1]=='\n')
|
||||
tmp[strlen(tmp)-1] = 0;
|
||||
// incase multiple cpu type are present, there will be multiple lines
|
||||
while(strchr(tmp, '\n'))
|
||||
*strchr(tmp,'\n') = ' ';
|
||||
strncpy(name, tmp, 199);
|
||||
return name;
|
||||
}
|
||||
@ -1706,6 +1709,9 @@ const char* getCpuName()
|
||||
// trim ending
|
||||
while(strlen(tmp) && tmp[strlen(tmp)-1]=='\n')
|
||||
tmp[strlen(tmp)-1] = 0;
|
||||
// incase multiple cpu type are present, there will be multiple lines
|
||||
while(strchr(tmp, '\n'))
|
||||
*strchr(tmp,'\n') = ' ';
|
||||
snprintf(name, 199, "unknown %s cpu", tmp);
|
||||
return name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user