Loading cmds/incident_helper/src/ih_util.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ record_t parseRecordByColumns(const std::string& line, const std::vector<int>& i } if (lineSize - lastIndex > 0) { int beginning = lastIndex; if (record.size() == indices.size()) { if (record.size() == indices.size() && !record.empty()) { // We've already encountered all of the columns...put whatever is // left in the last column. record.pop_back(); Loading cmds/incident_helper/src/parsers/CpuInfoParser.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -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, Loading cmds/incident_helper/testdata/cpuinfo.txt +4 −4 Original line number Diff line number Diff line Tasks: 2038 total, 1 running,2033 sleeping, 0 stopped, 0 zombie Threads: 2038 total, 1 running,2033 sleeping, 0 stopped, 0 zombie Mem: 3842668k total, 3761936k used, 80732k free, 220188k buffers Loading Loading
cmds/incident_helper/src/ih_util.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ record_t parseRecordByColumns(const std::string& line, const std::vector<int>& i } if (lineSize - lastIndex > 0) { int beginning = lastIndex; if (record.size() == indices.size()) { if (record.size() == indices.size() && !record.empty()) { // We've already encountered all of the columns...put whatever is // left in the last column. record.pop_back(); Loading
cmds/incident_helper/src/parsers/CpuInfoParser.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -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, Loading
cmds/incident_helper/testdata/cpuinfo.txt +4 −4 Original line number Diff line number Diff line Tasks: 2038 total, 1 running,2033 sleeping, 0 stopped, 0 zombie Threads: 2038 total, 1 running,2033 sleeping, 0 stopped, 0 zombie Mem: 3842668k total, 3761936k used, 80732k free, 220188k buffers Loading