diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-03-06 14:32:06 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-03-06 14:32:06 +0100 |
| commit | 0c8e0b67084c96c9482494ffbf9fdd04a0b65c4c (patch) | |
| tree | 705aeab4380a42e022800215096e0eab47749634 /src | |
| parent | c71a840e7457c1f1022fa9fde1163a00ae25b32c (diff) | |
| download | box64-0c8e0b67084c96c9482494ffbf9fdd04a0b65c4c.tar.gz box64-0c8e0b67084c96c9482494ffbf9fdd04a0b65c4c.zip | |
Fixed cpu name extraction for big.LITTLE configurations
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index b3f52353..ea532c7c 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1474,6 +1474,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; } @@ -1489,6 +1492,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; } |