summaryrefslogtreecommitdiff
path: root/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/incident_helper/src/parsers/CpuInfoParser.cpp')
-rw-r--r--cmds/incident_helper/src/parsers/CpuInfoParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
index 21ced9cb485c..5d525e6c7f3e 100644
--- a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
+++ b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp
@@ -65,8 +65,9 @@ CpuInfoParser::Parse(const int in, const int out) const
if (line.empty()) continue;
nline++;
-
- if (stripPrefix(&line, "Tasks:")) {
+ // The format changes from time to time in toybox/toys/posix/ps.c
+ // With -H, it prints Threads instead of Tasks (FLAG(H)?"Thread":"Task")
+ if (stripPrefix(&line, "Threads:")) {
writeSuffixLine(&proto, CpuInfoProto::TASK_STATS, line, COMMA_DELIMITER,
CpuInfoProto::TaskStats::_FIELD_COUNT,
CpuInfoProto::TaskStats::_FIELD_NAMES,