CPUSensor: update depth to find hwmonNamePaths
The recursive way in findFiles had been modified, the depth of cpusensor
should be changed to 6.
Tested: hwmon path is found and cpusensor create successfully.
Signed-off-by: Jeff Lin <JeffLin2@quantatw.com>
Change-Id: Ib2031a390b9a4b3de7c0482384a89d762d7d7f03
diff --git a/src/CPUSensorMain.cpp b/src/CPUSensorMain.cpp
index 07be8f6..f304e3f 100644
--- a/src/CPUSensorMain.cpp
+++ b/src/CPUSensorMain.cpp
@@ -169,7 +169,7 @@
std::vector<fs::path> hwmonNamePaths;
if (!findFiles(fs::path(R"(/sys/bus/peci/devices)"),
R"(peci-\d+/\d+-.+/peci-.+/hwmon/hwmon\d+/name$)",
- hwmonNamePaths, 1))
+ hwmonNamePaths, 6))
{
std::cerr << "No CPU sensors in system\n";
return true;