diff --git a/contrib/mma/src/linux/mma_linux.cpp b/contrib/mma/src/linux/mma_linux.cpp index 23596253d5..07058c08c8 100644 --- a/contrib/mma/src/linux/mma_linux.cpp +++ b/contrib/mma/src/linux/mma_linux.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "../include/linux/mma_linux.h" @@ -485,38 +486,7 @@ bool MMALinux::MergeBootWithRootARM(ResourceLinux::DiskStatsList& /*disk_stats_i int MMALinux::GetCpuCores(void) { - std::list cpuinfo_list = TokenizeIntoLines(FileToString("/proc/cpuinfo")); - std::vector cpucore_vect; - auto idx = 0; - if(!is_vrm) - { - for (auto iter : cpuinfo_list) - { - if (idx == 12) - { - cpucore_vect = SplitLine(iter); - break; - } - idx++; - } - return std::stoi(cpucore_vect[3]); - } - else - { - auto cpu_cores=0; - for (auto iter : cpuinfo_list) - { - cpucore_vect = SplitLine(iter); - for(auto iter1:cpucore_vect) - { - if(iter1.find("processor")!= std::string::npos) - { - cpu_cores++; - } - } - } - return cpu_cores; - } + return get_nprocs(); } bool MMALinux::CheckIfIsALinuxVRM()