Home
last modified time | relevance | path

Searched refs:line (Results 1 – 25 of 192) sorted by relevance

12345678

/base/startup/init/services/modules/seccomp/scripts/tools/
Dlibc_static_analysis.py62 def line_find_syscall_nr(line, nr_set, nr_last): argument
66 if ';' in line:
67 nr_tmp, is_digit = gen_policy.str_convert_to_int(line[line.find('0x'):])
69 nr_tmp, is_digit = gen_policy.str_convert_to_int(line[line.rfind('#') + 1:])
70 if is_digit and 'movt' in line:
74 if is_digit and 'movw' in line:
105 for line in reversed(lines):
106 line = line.strip()
107 if not line:
112 if not is_find_svc and ('svc\t' in line or 'svc ' in line):
[all …]
Dmerge_policy.py31 def update_parse_item(self, line): argument
32 item = line[1:]
37 def parse_line(self, line): argument
40 line = line.replace(' ', '')
41 pos = line.rfind(';')
44 self.seccomp_policy_param.get(arch).value_function.get(self.cur_parse_item)(line)
46 arches = line[pos + 1:].split(',')
50 … self.seccomp_policy_param.get(arch).value_function.get(self.cur_parse_item)(line[:pos])
93 for line in fp:
94 line = line.strip()
[all …]
Daudit_log_analysis.py32 for line in fp:
33 line = line.strip()
34 if 'audit' not in line or 'type=1326' not in line:
37 pos = line.find(' syscall=')
38 arch_id = line[line.find('arch=') + 5 : pos]
39 syscall, _ = gen_policy.str_convert_to_int(line[pos + 9: line.find(' compat')])
/base/security/selinux_adapter/scripts/
Dbuild_ignore_cfg.py69 for line in lines:
70 strip_line = line.strip()
73 if line.endswith(b"\r\n") or line.endswith(b"\r"):
109 def check_and_add_line(lines, line): argument
110 line = line.strip()
111 if not line:
114 if len(line) >= len(existing_line) and line.startswith(existing_line):
116 elif len(line) < len(existing_line) and existing_line.startswith(line):
118 lines.append(line)
120 lines.append(line)
[all …]
/base/hiviewdfx/hiview/utility/common_utils/
Dtbox.cpp83 bool Tbox::IsCallStack(string& line) in IsCallStack() argument
85 if (regex_search(line, regex("^\\s+at (.*)\\(.*")) || in IsCallStack()
86 regex_search(line, regex("^\\s*at .*")) || in IsCallStack()
87 regex_search(line, regex("^\\s+- (.*)\\(.*")) || in IsCallStack()
88 regex_search(line, regex("\\s+#\\d+")) || in IsCallStack()
89 regex_search(line, regex("[0-9a-zA-Z_]+\\+0x[0-9a-f]+/0x[0-9a-f]+")) || in IsCallStack()
90 regex_search(line, regex("#\\d+")) || in IsCallStack()
91 regex_search(line, regex("\\.*"))) { in IsCallStack()
97 bool Tbox::HasCausedBy(const string& line) in HasCausedBy() argument
99 if ((line.find(CAUSEDBY_HEADER) != string::npos) || in HasCausedBy()
[all …]
/base/startup/init/services/etc/param/
Dparam_fixer.py38 def parse_params(line, contents): argument
39 line = line.strip()
40 pos = line.find('=')
43 name = line[:pos]
44 value = line[pos + 1:]
60 for line in lines:
61 line = line.strip()
63 if line.startswith('#') or not line:
65 parse_params(line, contents)
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/
Dbbox_detector_plugin.cpp127 string line; in StartBootScan() local
134 while (FileUtil::GetLastLine(fin, line) && num > 0) { in StartBootScan()
136 std::map<std::string, std::string> historyMap = GetValueFromHistory(line); in StartBootScan()
146 … static_cast<int64_t>(TimeUtil::StrToTimeStamp(StringUtil::GetMidSubstr(line, "time [", "-"), in StartBootScan()
148 … static_cast<int64_t>(TimeUtil::StrToTimeStamp(StringUtil::GetMidSubstr(line, "time[", "-"), in StartBootScan()
154 auto happenTime_ = GetHappenTime(line, hisiHistoryPath); in StartBootScan()
156 …HIVIEW_LOGI("BBox write history line is %{public}s write result = %{public}d", line.c_str(), res); in StartBootScan()
174 uint64_t BBoxDetectorPlugin::GetHappenTime(std::string& line, bool hisiHistoryPath) in GetHappenTime() argument
177 static_cast<uint64_t>(Tbox::GetHappenTime(StringUtil::GetMidSubstr(line, "time [", "-"), in GetHappenTime()
179 static_cast<uint64_t>(Tbox::GetHappenTime(StringUtil::GetMidSubstr(line, "time[", "-"), in GetHappenTime()
[all …]
/base/telephony/core_service/utils/vcard/src/
Dvcard_decoder_v21.cpp134 std::string line = GetNonEmptyLine(); in ReadBegin() local
135 if (line == "") { in ReadBegin()
139 std::vector<std::string> strArr = VCardUtils::Split(line, ":"); in ReadBegin()
162 std::string line = GetNonEmptyLine(); in ParseItem() local
163 if (line == "") { in ParseItem()
173 BuildRawData(line, rawData, errorCode); in ParseItem()
244 std::string line = PeekLine(); in DealV21Value() local
245 …if (line.empty() || line[0] != ' ' || VCardUtils::ToUpper(line).find("END:VCARD") != std::string::… in DealV21Value()
252 str += line.substr(1); in DealV21Value()
305 std::string line = ""; in GetLine() local
[all …]
Dvcard_decoder_v30.cpp33 std::string line = ""; in GetLine() local
35 line = preLine_; in GetLine()
37 return line; in GetLine()
39 fileUtils_.ReadLine(line); in GetLine()
40 return line; in GetLine()
48 std::string line = ""; in PeekLine() local
49 fileUtils_.PeekLine(line); in PeekLine()
50 return line; in PeekLine()
55 std::string line; in GetNonEmptyLine() local
57 while (fileUtils_.ReadLine(line)) { in GetNonEmptyLine()
[all …]
Dvcard_file_utils.cpp58 bool VCardFileUtils::ReadLine(std::string &line) in ReadLine() argument
64 std::getline(*file_, line); in ReadLine()
68 bool VCardFileUtils::PeekLine(std::string &line) in PeekLine() argument
76 std::getline(*file_, line); in PeekLine()
106 std::string line; in SkipEmptyLines() local
108 while (std::getline(*file_, line)) { in SkipEmptyLines()
109 if (!line.empty()) { in SkipEmptyLines()
/base/hiviewdfx/faultloggerd/test/unittest/unwind/
Delf_imitate.cpp343 std::string line = GetNextLine(fp, &status); in GetPrgOffset() local
348 auto strVec = StringSplit(line, " "); in GetPrgOffset()
352 DFXLOG_ERROR(" line = %s", line.c_str()); in GetPrgOffset()
364 std::string line = GetNextLine(fp, &status); in GetSecOffset() local
369 auto strVec = StringSplit(line, " "); in GetSecOffset()
373 DFXLOG_ERROR(" line = %s", line.c_str()); in GetSecOffset()
385 std::string line = GetNextLine(fp, &status); in GetFlag() local
390 auto strVec = StringSplit(line, " "); in GetFlag()
394 DFXLOG_ERROR(" line = %s", line.c_str()); in GetFlag()
406 std::string line = GetNextLine(fp, &status); in GetEhdrSize() local
[all …]
/base/notification/eventhandler/test/systemtest/ems_logger_system_test/
Dems_logger_system_test.cpp62 void Log(const std::string &line) in Log() argument
65 GTEST_LOG_(INFO) << line; in Log()
75 void Log(const std::string &line) in Log() argument
78 GTEST_LOG_(INFO) << line; in Log()
88 void Log(const std::string &line) in Log() argument
91 GTEST_LOG_(INFO) << line; in Log()
101 void Log(const std::string &line) in Log() argument
104 GTEST_LOG_(INFO) << line; in Log()
114 void Log(const std::string &line) in Log() argument
117 GTEST_LOG_(INFO) << line; in Log()
/base/hiviewdfx/hiview/plugins/reliability/leak_detectors/native_leak/
Dnative_leak_config.cpp53 string line; in GetThresholdList() local
54 while (getline(fin, line)) { in GetThresholdList()
55 HIVIEW_LOGI("start match line:%{public}s", line.c_str()); in GetThresholdList()
56 if (line.empty() || line[0] == '#') { in GetThresholdList()
62 if (!regex_match(line, matches, pattern)) { in GetThresholdList()
63 HIVIEW_LOGW("regex_match failed, this line:%{public}s", line.c_str()); in GetThresholdList()
/base/hiviewdfx/hiview/plugins/faultlogger/service/
Dfaultlog_formatter.cpp146 bool ParseFaultLogLine(const std::list<const char **>& parseList, const std::string& line, const st… in ParseFaultLogLine() argument
154 if (line.find(sectionHead) != std::string::npos) { in ParseFaultLogLine()
155 if (!line.empty() && line.at(line.size() - 1) == ':') { in ParseFaultLogLine()
161 info.sectionMap[item[LOG_MAP_KEY]] = line.substr(line.find_first_of(":") + 1); in ParseFaultLogLine()
178 std::string line; in WriteStackTraceFromLog() local
180 while (std::getline(logFile, line)) { in WriteStackTraceFromLog()
185 if (line.empty()) { in WriteStackTraceFromLog()
189 if ((line.find("----- pid") != std::string::npos) && in WriteStackTraceFromLog()
190 (line.find(pidStr) != std::string::npos)) { in WriteStackTraceFromLog()
194 if ((line.find("----- end") != std::string::npos) && in WriteStackTraceFromLog()
[all …]
/base/security/selinux_adapter/scripts/selinux_check/
Dcheck_baseline.py42 for line in cil_read:
43 line = line.strip()
44 if not line.startswith('(allow ') and not line.startswith('(auditallow '):
46 sub_string = simplify_string(line)
87 for line in cil_read:
88 if not line.startswith('(typeattributeset '):
90 sub_string = simplify_string(line)
100 for line in cil_read:
101 if not line.startswith('(common '):
103 sub_string = simplify_string(line)
[all …]
Dcheck_perm_group.py41 for line in cil_read:
42 if not line.startswith('(allow ') and not line.startswith('(auditallow '):
44 sub_string = simplify_string(line)
85 for line in cil_read:
86 if not line.startswith('(typeattributeset '):
88 sub_string = simplify_string(line)
98 for line in cil_read:
99 if not line.startswith('(common '):
101 sub_string = simplify_string(line)
108 for line in cil_read:
[all …]
/base/global/i18n/frameworks/intl/src/
Dholiday_manager.cpp170 std::string line; in ReadHolidayFile() local
171 while (getline(fin, line)) { in ReadHolidayFile()
172 line = Trim(line); in ReadHolidayFile()
173 if (line.compare(ITEM_BEGIN_TAG) != 0) { in ReadHolidayFile()
177 while (getline(fin, line)) { in ReadHolidayFile()
178 line = Trim(line); in ReadHolidayFile()
179 ParseFileLine(line, &(holidayItem)); in ReadHolidayFile()
180 if (line.compare(ITEM_END_TAG) == 0) { in ReadHolidayFile()
190 void HolidayManager::ParseFileLine(const std::string &line, HolidayInfoItem *holidayItem) in ParseFileLine() argument
197 bool found = std::regex_search(line, match, reg); in ParseFileLine()
[all …]
/base/startup/init/services/etc/passwd_appender/
Dpasswd_appender.py43 for line in source_f:
44 arr = line.strip().split(":")
63 for line in src:
64 if line != "\n":
65 arr = line.strip().split(":")
79 for line in options.lines:
80 arr = line.strip().split(":")
132 line = fp.readline()
133 while line :
134 if line.startswith("#") or len(line) < 3:
[all …]
/base/hiviewdfx/hidumper/frameworks/native/src/executor/
Dzipfolder_output.cpp84 std::string line; in Execute() local
87 line.append(item); in Execute()
91 … if (line.empty() || (line.at(line.length() - 1) != NEW_LINE_BREAKS_CHAR)) { // No line breaks in Execute()
92 line.append(NEW_LINE_BREAKS_STR); in Execute()
95 outstr.append(line); in Execute()
96 line.clear(); in Execute()
/base/security/code_signature/test/unittest/utils/include/
Dlocal_key_helper.h36 std::string line; in GetEnforceFileResult() local
37 while (in >> line) { in GetEnforceFileResult()
38 if (line.find(LOCAL_KEY_NAME) != line.npos) { in GetEnforceFileResult()
/base/hiviewdfx/hitrace/frameworks/native/
Ddynamic_buffer.cpp44 std::string line; in GetPerCpuStatsInfo() local
48 while (std::getline(inFile, line)) { in GetPerCpuStatsInfo()
49 if ((line.find("oldest event ts: ")) != std::string::npos) { in GetPerCpuStatsInfo()
50 traceStats.oldTs = std::stod(line.substr(oldTsPos)); in GetPerCpuStatsInfo()
52 if ((line.find("now ts: ")) != std::string::npos) { in GetPerCpuStatsInfo()
53 traceStats.nowTs = std::stod(line.substr(nowTsPos)); in GetPerCpuStatsInfo()
55 if ((line.find("bytes: ")) != std::string::npos) { in GetPerCpuStatsInfo()
56 traceStats.bytes = std::stod(line.substr(bytesPos)); in GetPerCpuStatsInfo()
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/
Ddfx_config.cpp145 std::string line(codeBuffer); in ReadConfig() local
146 std::string::size_type newLinePos = line.find_first_of("\n"); in ReadConfig()
147 if (newLinePos != line.npos) { in ReadConfig()
148 line.resize(newLinePos); in ReadConfig()
150 std::string::size_type equalSignPos = line.find_first_of("="); in ReadConfig()
151 if (equalSignPos != line.npos) { in ReadConfig()
152 std::string key = line.substr(0, equalSignPos); in ReadConfig()
153 std::string value = line.substr(equalSignPos + 1); in ReadConfig()
/base/hiviewdfx/hiview/utility/smart_parser/feature_analysis/
Dfeature_analysis.cpp75 string line; in RawInfoPosition() local
78 while (getline(buffer, line)) { in RawInfoPosition()
79 if (line.length() > 2048 || // 2048 : max length of line in RawInfoPosition()
80 … (CheckStartSegment(segmentStart) && (line.empty() || line[0] == ' ' || line[0] == '\t'))) { in RawInfoPosition()
83 GetCursorInfo(buffer, line); in RawInfoPosition()
88 …eckDepend(featureCmd) || (!CheckVariableParam(featureCmd)) || (!IsSourceMatch(line, featureCmd))) { in RawInfoPosition()
93 bool matchFlag = ParseElementForParam(line, featureCmd); in RawInfoPosition()
94 while (--num > 0 && getline(buffer, line)) { in RawInfoPosition()
95 GetCursorInfo(buffer, line); in RawInfoPosition()
96 ParseElementForParam(line, featureCmd); in RawInfoPosition()
[all …]
/base/hiviewdfx/hitrace/tools/hitrace_converter/
Dhitrace_converter.py123 for line in infile:
124 reverse_line = line[::-1]
128 line = line.rstrip(' ')
129 pos = line.rfind(' ')
130 line = "%s%s%s" % (line[:pos], '|', line[pos+1:])
133 line = "%s\n" % (line.rstrip()[:-1])
135 outfile.write(line)
374 for line in events_format_lines:
375 line = line.lstrip()
376 if line.startswith(name_line_prefix):
[all …]
/base/telephony/ril_adapter/services/vendor/src/
Dat_network.c287 static void ParseGetGsmSignalStrength(const char *line, HRilRssi *hrilRssi) in ParseGetGsmSignalStrength() argument
289 char *lineStr = (char *)line; in ParseGetGsmSignalStrength()
299 static void ParseGetLteSignalStrength(const char *line, HRilRssi *hrilRssi) in ParseGetLteSignalStrength() argument
301 char *lineStr = (char *)line; in ParseGetLteSignalStrength()
315 static void ParseGetWcdmaSignalStrength(const char *line, HRilRssi *hrilRssi) in ParseGetWcdmaSignalStrength() argument
317 char *lineStr = (char *)line; in ParseGetWcdmaSignalStrength()
331 static void ParseGetTdScdmaSignalStrength(const char *line, HRilRssi *hrilRssi) in ParseGetTdScdmaSignalStrength() argument
333 char *lineStr = (char *)line; in ParseGetTdScdmaSignalStrength()
342 static void ParseGetCdmaSignalStrength(const char *line, HRilRssi *hrilRssi) in ParseGetCdmaSignalStrength() argument
344 char *lineStr = (char *)line; in ParseGetCdmaSignalStrength()
[all …]

12345678