summaryrefslogtreecommitdiff
path: root/cmds/incident_helper/src/parsers/KernelWakesParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/incident_helper/src/parsers/KernelWakesParser.cpp')
-rw-r--r--cmds/incident_helper/src/parsers/KernelWakesParser.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmds/incident_helper/src/parsers/KernelWakesParser.cpp b/cmds/incident_helper/src/parsers/KernelWakesParser.cpp
index ada4a5d0ffe2..cae51abbe57f 100644
--- a/cmds/incident_helper/src/parsers/KernelWakesParser.cpp
+++ b/cmds/incident_helper/src/parsers/KernelWakesParser.cpp
@@ -47,10 +47,14 @@ KernelWakesParser::Parse(const int in, const int out) const
// parse for each record, the line delimiter is \t only!
record = parseRecord(line, TAB_DELIMITER);
- if (record.size() != header.size()) {
+ if (record.size() < header.size()) {
// TODO: log this to incident report!
fprintf(stderr, "[%s]Line %d has missing fields\n%s\n", this->name.string(), nline, line.c_str());
continue;
+ } else if (record.size() > header.size()) {
+ // TODO: log this to incident report!
+ fprintf(stderr, "[%s]Line %d has extra fields\n%s\n", this->name.string(), nline, line.c_str());
+ continue;
}
long long token = proto.start(KernelWakeSources::WAKEUP_SOURCES);