/system/core/base/ |
D | file.cpp | 38 bool ReadFdToString(int fd, std::string* content) { in ReadFdToString() argument 39 content->clear(); in ReadFdToString() 44 content->append(buf, n); in ReadFdToString() 49 bool ReadFileToString(const std::string& path, std::string* content) { in ReadFileToString() argument 50 content->clear(); in ReadFileToString() 56 bool result = ReadFdToString(fd, content); in ReadFileToString() 61 bool WriteStringToFd(const std::string& content, int fd) { in WriteStringToFd() argument 62 const char* p = content.data(); in WriteStringToFd() 63 size_t left = content.size(); in WriteStringToFd() 84 bool WriteStringToFile(const std::string& content, const std::string& path, in WriteStringToFile() argument [all …]
|
/system/connectivity/dhcp_client/ |
D | dhcp_options_parser.cc | 79 uint8_t content = *reinterpret_cast<const uint8_t*>(buffer); in GetOption() local 80 value_vector->push_back(content); in GetOption() 97 uint16_t content = *reinterpret_cast<const uint16_t*>(buffer); in GetOption() local 98 content = ntohs(content); in GetOption() 99 value_vector->push_back(content); in GetOption() 116 uint32_t content = *reinterpret_cast<const uint32_t*>(buffer); in GetOption() local 117 content = ntohl(content); in GetOption() 118 value_vector->push_back(content); in GetOption() 153 uint8_t content = *buffer; in GetOption() local 155 if (content == 1) { in GetOption() [all …]
|
/system/core/liblog/ |
D | pmsg_reader.c | 267 struct content { in __android_log_pmsg_file_read() struct 276 } *content; in __android_log_pmsg_file_read() local 279 struct listnode content; in __android_log_pmsg_file_read() member 416 list_init(&names->content); in __android_log_pmsg_file_read() 465 list_for_each_safe(node, n, &names->content) { in __android_log_pmsg_file_read() 466 content = node_to_item(node, struct content, node); in __android_log_pmsg_file_read() 467 if (transp.logMsg.entry.nsec == content->entry.nsec) { in __android_log_pmsg_file_read() 468 list_remove(&content->node); in __android_log_pmsg_file_read() 469 free(content); in __android_log_pmsg_file_read() 474 content = calloc(1, sizeof(content->node) + in __android_log_pmsg_file_read() [all …]
|
/system/connectivity/shill/ |
D | file_reader_unittest.cc | 74 string content = base::JoinString(lines, "\n"); in TEST_F() local 82 ASSERT_EQ(content.size(), in TEST_F() 83 base::WriteFile(path, content.c_str(), content.size())); in TEST_F() 87 content.push_back('\n'); in TEST_F() 88 ASSERT_EQ(content.size(), in TEST_F() 89 base::WriteFile(path, content.c_str(), content.size())); in TEST_F()
|
/system/core/base/include/android-base/ |
D | file.h | 30 bool ReadFdToString(int fd, std::string* content); 31 bool ReadFileToString(const std::string& path, std::string* content); 33 bool WriteStringToFile(const std::string& content, const std::string& path); 34 bool WriteStringToFd(const std::string& content, int fd); 37 bool WriteStringToFile(const std::string& content, const std::string& path,
|
/system/ca-certificates/google/ |
D | extract_from_pem.py | 24 def WriteCertificateFile(content, base_name, output_dir): argument 38 if content == existing_file.read(): 44 new_file.write(content) 78 content = '%s%sSHA1 Fingerprint=%s\n' % (x509.as_pem(), 82 WriteCertificateFile(content, base_name, args.output_dir)
|
/system/core/metricsd/uploader/mock/ |
D | sender_mock.cc | 23 bool SenderMock::Send(const std::string& content, const std::string& hash) { in Send() argument 25 last_message_ = content; in Send() 26 is_good_proto_ = last_message_proto_.ParseFromString(content); in Send()
|
/system/connectivity/apmanager/ |
D | file_writer.cc | 38 const std::string& content) { in Write() argument 40 content.c_str(), in Write() 41 content.size()) == -1) { in Write()
|
/system/core/crash_reporter/ |
D | kernel_warning_collector.cc | 42 bool KernelWarningCollector::LoadKernelWarning(std::string *content, in LoadKernelWarning() argument 45 if (!base::ReadFileToString(kernel_warning_path, content)) { in LoadKernelWarning() 50 std::string::size_type end_position = content->find('\n'); in LoadKernelWarning() 55 *signature = content->substr(0, end_position); in LoadKernelWarning()
|
/system/extras/simpleperf/ |
D | cmd_report_test.cpp | 51 ASSERT_TRUE(android::base::ReadFileToString(tmp_file.path, &content)); in ReportRaw() 52 ASSERT_TRUE(!content.empty()); in ReportRaw() 53 std::vector<std::string> raw_lines = android::base::Split(content, "\n"); in ReportRaw() 66 std::string content; member in ReportCommandTest 74 ASSERT_NE(content.find("GlobalFunc"), std::string::npos); in TEST_F() 260 ASSERT_NE(content.find(GetUrlInApk(APK_FILE, NATIVELIB_IN_APK)), std::string::npos); in TEST_F() 261 ASSERT_NE(content.find("Func2"), std::string::npos); in TEST_F() 286 ASSERT_NE(content.find(GetUrlInApk(APK_FILE, NATIVELIB_IN_APK)), std::string::npos); in TEST_F() 287 ASSERT_NE(content.find("Func2"), std::string::npos); in TEST_F() 288 ASSERT_NE(content.find("Func1"), std::string::npos); in TEST_F() [all …]
|
D | cpu_hotplug_test.cpp | 97 std::string content; in IsCpuOnline() local 98 CHECK(android::base::ReadFileToString(filename, &content)) << "failed to read file " << filename; in IsCpuOnline() 99 return (content.find('1') != std::string::npos); in IsCpuOnline() 107 std::string content = online ? "1" : "0"; in SetCpuOnline() local 108 CHECK(android::base::WriteStringToFile(content, filename)) << "Write " << content << " to " in SetCpuOnline()
|
D | read_elf.cpp | 91 std::string content; in GetBuildIdFromNoteFile() local 92 if (!android::base::ReadFileToString(filename, &content)) { in GetBuildIdFromNoteFile() 96 if (GetBuildIdFromNoteSection(content.c_str(), content.size(), build_id) == false) { in GetBuildIdFromNoteFile() 359 std::string* content) { in ReadSectionFromELFFile() argument 368 content->append(data_or_err->begin(), data_or_err->end()); in ReadSectionFromELFFile() 377 std::string* content) { in ReadSectionFromElfFile() argument 387 result = ReadSectionFromELFFile(elf->getELFFile(), section_name, content); in ReadSectionFromElfFile() 389 result = ReadSectionFromELFFile(elf->getELFFile(), section_name, content); in ReadSectionFromElfFile()
|
D | gtest_main.cpp | 44 std::string content; in ExtractTestDataFromElfSection() local 45 if (!ReadSectionFromElfFile("/proc/self/exe", testdata_section, &content)) { in ExtractTestDataFromElfSection() 50 if (!android::base::WriteStringToFile(content, tmp_file.path)) { in ExtractTestDataFromElfSection()
|
/system/extras/verity/ |
D | VeritySigner.java | 42 byte[] content = Utils.read(args[0]); in main() 51 if (Utils.verify(publicKey, content, signature, in main() 65 byte[] signature = Utils.sign(privateKey, content); in main()
|
/system/core/bootstat/ |
D | boot_event_record_store.cpp | 52 std::string content; in ParseRecordEventTime() local 53 if (!android::base::ReadFileToString(path, &content)) { in ParseRecordEventTime() 59 if (!content.empty()) { in ParseRecordEventTime() 60 int32_t value = std::stoi(content); in ParseRecordEventTime()
|
/system/core/metricsd/uploader/ |
D | sender_http.cc | 29 bool HttpSender::Send(const std::string& content, in Send() argument 38 content, in Send()
|
D | sender.h | 27 virtual bool Send(const std::string& content, const std::string& hash) = 0;
|
/system/weaved/buffet/ |
D | buffet_config_unittest.cc | 105 bool ReadFile(const base::FilePath& path, std::string* content) override { in ReadFile() argument 109 *content = fake_file_content_[path.value()]; in ReadFile() 113 const std::string& content) override { in WriteFile() argument 115 fake_file_content_[path.value()] = content; in WriteFile()
|
D | buffet_config.h | 57 virtual bool ReadFile(const base::FilePath& path, std::string* content) = 0; 59 const std::string& content) = 0;
|
D | buffet_config.cc | 41 bool ReadFile(const base::FilePath& path, std::string* content) override { in ReadFile() argument 42 return base::ReadFileToString(path, content); in ReadFile() 45 const std::string& content) override { in WriteFile() argument 46 return base::ImportantFileWriter::WriteFileAtomically(path, content); in WriteFile()
|
/system/core/init/ |
D | util.h | 34 bool read_file(const char* path, std::string* content); 35 int write_file(const char* path, const char* content);
|
D | util.cpp | 176 bool read_file(const char* path, std::string* content) { in read_file() argument 177 content->clear(); in read_file() 196 bool okay = android::base::ReadFdToString(fd, content); in read_file() 201 int write_file(const char* path, const char* content) { in write_file() argument 207 int result = android::base::WriteStringToFd(content, fd) ? 0 : -1; in write_file()
|
D | bootchart.cpp | 109 std::string content; in do_log_file() local 110 if (android::base::ReadFileToString(procfile, &content)) { in do_log_file() 111 fprintf(log, "%s\n", content.c_str()); in do_log_file()
|
/system/tools/aidl/tests/ |
D | fake_io_delegate.cpp | 138 bool FakeIoDelegate::GetWrittenContents(const string& path, string* content) { in GetWrittenContents() argument 143 if (content) { in GetWrittenContents() 144 *content = it->second; in GetWrittenContents()
|
/system/sepolicy/tools/ |
D | insertkeys.py | 201 def characters(self, content): argument 202 if not content.isspace(): 203 self._out.write(saxutils.escape(content)) 205 def ignorableWhitespace(self, content): argument
|