Ignore labels
Add a label literal.
Ignore labels when scanning sysfs.
Change-Id: Iab1946cc53bb5b32d9853cdca6c9b8e5ee5532e3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/sensorset.cpp b/sensorset.cpp
index 07c104f..e03e37d 100644
--- a/sensorset.cpp
+++ b/sensorset.cpp
@@ -17,6 +17,7 @@
#include <iostream>
#include "sensorset.hpp"
#include "directory.hpp"
+#include "hwmon.hpp"
// TODO: Issue#2 - STL regex generates really bloated code. Use POSIX regex
// interfaces instead.
@@ -39,6 +40,11 @@
continue;
}
+ if (match[3] == hwmon::entry::label)
+ {
+ continue;
+ }
+
container[make_pair(match[1], match[2])].emplace(match[3]);
}
}