We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 507c06e + e095f44 commit 1e3ccc8Copy full SHA for 1e3ccc8
src/sysinfo.cc
@@ -404,7 +404,13 @@ int GetNumCPUs() {
404
if (ln.empty()) continue;
405
size_t SplitIdx = ln.find(':');
406
std::string value;
407
+#if defined(__s390__)
408
+ // s390 has another format in /proc/cpuinfo
409
+ // it needs to be parsed differently
410
+ if (SplitIdx != std::string::npos) value = ln.substr(Key.size()+1,SplitIdx-Key.size()-1);
411
+#else
412
if (SplitIdx != std::string::npos) value = ln.substr(SplitIdx + 1);
413
+#endif
414
if (ln.size() >= Key.size() && ln.compare(0, Key.size(), Key) == 0) {
415
NumCPUs++;
416
if (!value.empty()) {
0 commit comments