/base/startup/init/services/modules/seccomp/scripts/tools/ |
H A D | libc_static_analysis.py | 62 def line_find_syscall_nr(line, nr_set, nr_last):
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 [all...] |
H A D | merge_policy.py | 71 def update_parse_item(self, line):
72 item = line[1:]
77 def parse_line(self, line):
80 line = line.replace(' ', '')
81 pos = line.rfind(';')
84 self.seccomp_policy_param.get(arch).value_function.get(self.cur_parse_item)(line)
86 arches = line[pos + 1:].split(',')
90 self.seccomp_policy_param.get(arch).value_function.get(self.cur_parse_item)(line[:pos])
94 for line i [all...] |
H A D | audit_log_analysis.py | 32 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 [all...] |
/base/security/selinux_adapter/scripts/ |
H A D | build_ignore_cfg.py | 68 err = "".join((ignore_file, " : need an empty line at end ")) 69 for line in lines: 70 strip_line = line.strip() 73 if line.endswith(b"\r\n") or line.endswith(b"\r"): 77 err = "".join((ignore_file, " : line must not be only / or /*")) 80 err = "".join((ignore_file, " : line must end with / or /*")) 109 def check_and_add_line(lines, line): 110 line = line [all...] |
/base/hiviewdfx/hiview/plugins/reliability/leak_detectors/native_leak/ |
H A D | native_leak_config.cpp | 53 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() 57 HIVIEW_LOGI("This line is a comment"); in GetThresholdList() 62 if (!regex_match(line, matches, pattern)) { in GetThresholdList() 63 HIVIEW_LOGW("regex_match failed, this line:%{public}s", line in GetThresholdList() [all...] |
/base/notification/eventhandler/test/systemtest/ems_logger_system_test/ |
H A D | ems_logger_system_test.cpp | 62 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() [all...] |
/base/hiviewdfx/hiview/framework/native/unified_collection/decorator/test/ |
H A D | decorator_test.cpp | 130 bool IsMatchAnyRegex(const std::string& line, const std::vector<std::regex>& regs)
in IsMatchAnyRegex() argument 132 return std::any_of(regs.begin(), regs.end(), [line](std::regex reg) {return regex_match(line, reg);});
in IsMatchAnyRegex() 135 void RemoveCollectorNameIfMatched(const std::string& line, std::unordered_set<std::string>& collectorNames)
in RemoveCollectorNameIfMatched() argument 138 if (strncmp(line.c_str(), name.c_str(), strlen(name.c_str())) == 0) {
in RemoveCollectorNameIfMatched() 153 std::string line;
in CheckContent() local 154 while (getline(file, line)) {
in CheckContent() 155 if (line.size() > 0 && line[line in CheckContent() [all...] |
/base/hiviewdfx/hiview/utility/common_utils/ |
H A D | tbox.cpp | 83 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 in HasCausedBy() 110 GetStackName(string line) GetStackName() argument [all...] |
/base/hiviewdfx/faultloggerd/test/unittest/unwind/ |
H A D | elf_imitate.cpp | 169 // drop header line in ParseElfHeaders() 258 DFXLOGE("line format incorrect:"); in GetMagic() 259 DFXLOGE(" line = %{public}s", magicLine.c_str()); in GetMagic() 285 DFXLOGE("line format incorrect:"); in GetClass() 286 DFXLOGE(" line = %{public}s", classLine.c_str()); in GetClass() 308 DFXLOGE("line format incorrect:"); in GetMachine() 309 DFXLOGE(" line = %{public}s", machineLine.c_str()); in GetMachine() 326 DFXLOGE("line format incorrect:"); in GetEntryAddr() 327 DFXLOGE(" line = %{public}s", entryLine.c_str()); in GetEntryAddr() 339 std::string line in GetPrgOffset() local 360 std::string line = GetNextLine(fp, &status); GetSecOffset() local 381 std::string line = GetNextLine(fp, &status); GetFlag() local 402 std::string line = GetNextLine(fp, &status); GetEhdrSize() local 423 std::string line = GetNextLine(fp, &status); GetPhdrSize() local 444 std::string line = GetNextLine(fp, &status); GetNumPhdrs() local 465 std::string line = GetNextLine(fp, &status); GetShdrSize() local 486 std::string line = GetNextLine(fp, &status); GetNumShdrs() local 507 std::string line = GetNextLine(fp, &status); GetShdrStrTabIdx() local 693 GetSecIndex(const std::string &line) GetSecIndex() argument [all...] |
/base/telephony/core_service/utils/vcard/src/ |
H A D | vcard_decoder_v21.cpp | 135 std::string line = GetNonEmptyLine(); in ReadBegin() local 136 if (line == "") { in ReadBegin() 140 std::vector<std::string> strArr = VCardUtils::Split(line, ":"); in ReadBegin() 163 std::string line = GetNonEmptyLine(); in ParseItem() local 164 if (line == "") { in ParseItem() 174 BuildRawData(line, rawData, errorCode); in ParseItem() 245 std::string line = PeekLine(); in DealV21Value() local 246 if (line.empty() || line[0] != ' ' || VCardUtils::ToUpper(line) in DealV21Value() 306 std::string line = ""; GetLine() local 313 std::string line = ""; PeekLine() local 320 std::string line = ""; GetNonEmptyLine() local 330 BuildRawData(const std::string &line, std::shared_ptr<VCardRawData> rawData, int32_t &errorCode) BuildRawData() argument 357 DealGroupOrTypeNameStatus(const std::string &line, std::shared_ptr<VCardRawData> rawData, int32_t &errorCode, int32_t &status, int32_t &namePos, int32_t &index) DealGroupOrTypeNameStatus() argument 389 DealParamsStatus(const std::string &line, std::shared_ptr<VCardRawData> rawData, int32_t &errorCode, int32_t &status, int32_t &namePos, int32_t &index) DealParamsStatus() argument 640 std::string line = GetLine(); GetQuotedPrintableValue() local 741 std::string line = PeekLine(); GetBase64() local 774 std::string line = PeekLine(); GetPoMultiLine() local 788 getUpperName(const std::string &line) getUpperName() argument [all...] |
H A D | vcard_decoder_v30.cpp | 33 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...] |
H A D | vcard_file_utils.cpp | 58 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/hiview/plugins/reliability/bbox_detectors/ |
H A D | bbox_detector_plugin.cpp | 141 string line;
in StartBootScan() local 148 while (FileUtil::GetLastLine(fin, line) && num > 0) {
in StartBootScan() 150 std::map<std::string, std::string> historyMap = GetValueFromHistory(line);
in StartBootScan() 160 static_cast<int64_t>(TimeUtil::StrToTimeStamp(StringUtil::GetMidSubstr(line, "time [", "-"),
in StartBootScan() 162 static_cast<int64_t>(TimeUtil::StrToTimeStamp(StringUtil::GetMidSubstr(line, "time[", "-"),
in StartBootScan() 168 auto happenTime = GetHappenTime(line);
in StartBootScan() 170 HIVIEW_LOGI("BBox write history line is %{public}s write result = %{public}d", line.c_str(), res);
in StartBootScan() 175 uint64_t BBoxDetectorPlugin::GetHappenTime(std::string& line)
in GetHappenTime() argument 178 static_cast<uint64_t>(Tbox::GetHappenTime(StringUtil::GetMidSubstr(line, "tim in GetHappenTime() 206 GetValueFromHistory(std::string& line) GetValueFromHistory() argument [all...] |
/base/security/code_signature/test/unittest/utils/include/ |
H A D | local_key_helper.h | 36 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/hidumper/test/unittest/common/ |
H A D | hidumper_test_utils.cpp | 32 std::string line = ""; in IsExistInCmdResult() local 33 return GetSpecialLine(cmd, str, line); in IsExistInCmdResult() 46 std::string line; in IsExistStrInFile() local 47 while (std::getline(file, line)) { in IsExistStrInFile() 48 if (line.find(str) != string::npos) { in IsExistStrInFile() 79 std::string line = buffer; in GetSpecialLine() local 80 if (line.find(str) != string::npos) { in GetSpecialLine() 82 specialLine = line; in GetSpecialLine() 90 std::string HidumperTestUtils::GetValueInLine(const std::string &line, int index) in GetValueInLine() argument 92 std::istringstream iss(line); in GetValueInLine() [all...] |
/base/startup/init/services/etc/passwd_appender/ |
H A D | passwd_appender.py | 34 parser.add_option('--append-line', action="append", type="string", dest="lines", help='appended lines') 43 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(":") 134 line = fp.readline() 135 while line [all...] |
/base/global/i18n/frameworks/intl/src/ |
H A D | holiday_manager.cpp | 170 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 in ReadHolidayFile() 190 ParseFileLine(const std::string &line, HolidayInfoItem *holidayItem) ParseFileLine() argument [all...] |
/base/security/selinux_adapter/scripts/selinux_check/ |
H A D | check_baseline.py | 42 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 i [all...] |
/base/hiviewdfx/hiview/core/param_update/src/ |
H A D | param_reader.cpp | 51 std::string line; in VerifyCertFile() local 53 std::getline(file, line); in VerifyCertFile() 56 StringUtil::SplitStr(line, ":", strs); in VerifyCertFile() 89 std::string line; in VerifyParamFile() local 90 while (std::getline(file, line)) { in VerifyParamFile() 92 if (line.find("Name: " + filePathStr) != std::string::npos) { in VerifyParamFile()
|
/base/hiviewdfx/hitrace/frameworks/native/ |
H A D | dynamic_buffer.cpp | 44 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/hidumper/frameworks/native/src/executor/ |
H A D | zipfolder_output.cpp | 84 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/global/i18n_lite/tools/i18n-dat-tool/src/main/java/ohos/global/i18n/ |
H A D | PluralFetcher.java | 61 String line = ""; in init() 62 while ((line = fin.readLine()) != null) { in init() 63 String[] temp = getPluralItems(line); in init() 73 String line = ""; in init() 74 while ((line = fin.readLine()) != null) { in init() 75 String[] temp = getPluralItems(line); in init() 111 private static String[] getPluralItems(String line) { in getPluralItems() argument 113 String trimedLine = line.trim(); in getPluralItems()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/ |
H A D | dfx_config.cpp | 130 std::string line(codeBuffer); in ReadConfig() 131 std::string::size_type newLinePos = line.find_first_of("\n"); in ReadConfig() 132 if (newLinePos != line.npos) { in ReadConfig() 133 line.resize(newLinePos); in ReadConfig() 135 std::string::size_type equalSignPos = line.find_first_of("="); in ReadConfig() 136 if (equalSignPos != line.npos) { in ReadConfig() 137 std::string key = line.substr(0, equalSignPos); in ReadConfig() 138 std::string value = line.substr(equalSignPos + 1); in ReadConfig()
|
/base/hiviewdfx/hiview/plugins/faultlogger/service/ |
H A D | faultlog_formatter.cpp | 157 bool ParseFaultLogLine(const std::list<const char* const*>& parseList, const std::string& line, in ParseFaultLogLine() argument 165 if (line.find(sectionHead) == std::string::npos) { in ParseFaultLogLine() 168 if (!line.empty() && line.at(line.size() - 1) == ':') { in ParseFaultLogLine() 174 info.sectionMap[item[LOG_MAP_KEY]] = line.substr(line.find_first_of(":") + 1); in ParseFaultLogLine() 190 std::string line; in WriteStackTraceFromLog() local 192 while (std::getline(logFile, line)) { in WriteStackTraceFromLog() 197 if (line in WriteStackTraceFromLog() 296 std::string line; ParseFaultLogInfoFromFile() local 328 std::string line; WriteLogToFile() local [all...] |
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/ |
H A D | hisysevent_c.cpp | 31 int HiSysEventInnerWrite(const char* func, int64_t line, const std::string& domain, const std::string& name, in HiSysEventInnerWrite() argument 36 return HiSysEvent::Write(func, line, domain, name, HiSysEvent::EventType(type), params, size); in HiSysEventInnerWrite() 45 int HiSysEvent_Write(const char* func, int64_t line, const char* domain, const char* name, in HiSysEvent_Write() argument 54 return OHOS::HiviewDFX::HiSysEventInnerWrite(func, line, domain, name, type, params, size); in HiSysEvent_Write()
|