Home
last modified time | relevance | path

Searched refs:file_path (Results 1 – 25 of 74) sorted by relevance

123

/system/core/fs_mgr/libfiemap/
Dfiemap_writer.cpp60 static inline void cleanup(const std::string& file_path, bool created) { in cleanup() argument
62 unlink(file_path.c_str()); in cleanup()
170 bool FiemapWriter::GetBlockDeviceForFile(const std::string& file_path, std::string* bdev_path, in GetBlockDeviceForFile() argument
173 if (stat(file_path.c_str(), &sb)) { in GetBlockDeviceForFile()
174 PLOG(ERROR) << "Failed to get stat for: " << file_path; in GetBlockDeviceForFile()
226 static uint64_t GetFileSize(const std::string& file_path) { in GetFileSize() argument
228 if (stat(file_path.c_str(), &sb)) { in GetFileSize()
229 PLOG(ERROR) << "Failed to get size for file: " << file_path; in GetFileSize()
236 static bool PerformFileChecks(const std::string& file_path, uint64_t* blocksz, uint32_t* fs_type) { in PerformFileChecks() argument
238 if (statfs64(file_path.c_str(), &sfs)) { in PerformFileChecks()
[all …]
Dsplit_fiemap_writer.cpp45 std::unique_ptr<SplitFiemap> SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument
49 if (!Create(file_path, file_size, max_piece_size, &ret, progress).is_ok()) { in Create()
55 FiemapStatus SplitFiemap::Create(const std::string& file_path, uint64_t file_size, in Create() argument
61 LOG(ERROR) << "Cannot create a fiemap for a 0-length file: " << file_path; in Create()
66 auto status = DetermineMaximumFileSize(file_path, &max_piece_size); in Create()
68 LOG(ERROR) << "Could not determine maximum file size for " << file_path; in Create()
74 RemoveSplitFiles(file_path); in Create()
92 out->list_file_ = file_path; in Create()
103 android::base::StringPrintf("%s.%04d", file_path.c_str(), (int)out->files_.size()); in Create()
126 PLOG(ERROR) << "Failed to open " << file_path; in Create()
[all …]
/system/apex/apexd/
Dapex_file_test.cpp57 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
58 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
65 int32_t rc = OpenArchive(file_path.c_str(), &handle); in TEST_P()
85 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
86 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
90 auto loop_device = WriteBlockApex(file_path, temp_file.path); in TEST_P()
100 const std::string file_path = kTestDataDir + "missing.apex"; in TEST() local
101 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST()
108 const std::string file_path = kTestDataDir + GetParam().prefix + ".apex"; in TEST_P() local
109 Result<ApexFile> apex_file = ApexFile::Open(file_path); in TEST_P()
[all …]
Dapexd_test.cpp931 std::string file_path = AddPreInstalledApex("apex.apexd_test.apex"); in TEST_F() local
934 ASSERT_THAT(ActivatePackage(file_path), Ok()); in TEST_F()
935 UnmountOnTearDown(file_path); in TEST_F()
951 std::string file_path = AddPreInstalledApex("test.rebootless_apex_v1.apex"); in TEST_F() local
954 ASSERT_THAT(ActivatePackage(file_path), Ok()); in TEST_F()
955 UnmountOnTearDown(file_path); in TEST_F()
965 std::string file_path = AddPreInstalledApex("test.rebootless_apex_v1.apex"); in TEST_F() local
975 std::string file_path = AddPreInstalledApex("test.rebootless_apex_v1.apex"); in TEST_F() local
978 ASSERT_THAT(ActivatePackage(file_path), Ok()); in TEST_F()
979 UnmountOnTearDown(file_path); in TEST_F()
[all …]
/system/linkerconfig/
Dmain.cc157 std::string file_path) { in WriteConfigurationToFile() argument
161 if (file_path != "") { in WriteConfigurationToFile()
162 file_out.open(file_path); in WriteConfigurationToFile()
164 return ErrnoError() << "Failed to open file " << file_path; in WriteConfigurationToFile()
174 return ErrnoError() << "Failed to write content to " << file_path; in WriteConfigurationToFile()
180 Result<void> UpdatePermission([[maybe_unused]] const std::string& file_path) { in UpdatePermission() argument
183 file_path.c_str(), in UpdatePermission()
186 return ErrnoError() << "Failed to update permission of " << file_path; in UpdatePermission()
268 std::string file_path = ""; in GenerateConfiguration() local
270 file_path = dir_path + "/ld.config.txt"; in GenerateConfiguration()
[all …]
/system/core/fs_mgr/libfiemap/include/libfiemap/
Dfiemap_writer.h49 static FiemapUniquePtr Open(const std::string& file_path, uint64_t file_size,
52 static FiemapStatus Open(const std::string& file_path, uint64_t file_size, FiemapUniquePtr* out,
66 static bool HasPinnedExtents(const std::string& file_path);
79 static bool GetBlockDeviceForFile(const std::string& file_path, std::string* bdev_path,
84 const std::string& file_path() const { return file_path_; }; in file_path() function
Dsplit_fiemap_writer.h44 static std::unique_ptr<SplitFiemap> Create(const std::string& file_path, uint64_t file_size,
47 static FiemapStatus Create(const std::string& file_path, uint64_t file_size,
52 static std::unique_ptr<SplitFiemap> Open(const std::string& file_path);
57 static bool GetSplitFileList(const std::string& file_path, std::vector<std::string>* list);
61 static bool RemoveSplitFiles(const std::string& file_path, std::string* message = nullptr);
/system/core/trusty/test/driver/
Dtrusty_driver_test.py22 def ReadFile(file_path): argument
23 with open(file_path, 'r') as f:
27 def WriteFile(file_path, s): argument
28 with open(file_path, 'w') as f:
/system/core/fs_mgr/
Dblockdev.cpp87 static Result<uint32_t> BlockDeviceQueueDepth(const std::string& file_path) { in BlockDeviceQueueDepth() argument
89 int res = stat(file_path.c_str(), &statbuf); in BlockDeviceQueueDepth()
91 return ErrnoError() << "stat(" << file_path << ")"; in BlockDeviceQueueDepth()
94 LOG(DEBUG) << __func__ << ": " << file_path << " -> " << blockdev; in BlockDeviceQueueDepth()
97 minor(statbuf.st_dev), file_path.c_str()); in BlockDeviceQueueDepth()
122 LOG(DEBUG) << __func__ << ": " << file_path << " is backed by /dev/" << blockdev in BlockDeviceQueueDepth()
130 const std::string& file_path) { in ConfigureQueueDepth() argument
137 const auto qd = BlockDeviceQueueDepth(file_path); in ConfigureQueueDepth()
/system/ca-certificates/google/
Dextract_from_pem.py35 file_path = os.path.join(output_dir, '%s.%d' % (base_name, i))
36 while os.path.exists(file_path):
37 with open(file_path) as existing_file:
42 file_path = os.path.join(output_dir, '%s.%d' % (base_name, i))
43 with open(file_path, 'w') as new_file:
/system/sepolicy/build/
Dfile_utils.py23 def make_parent_dirs(file_path): argument
25 if os.path.exists(file_path):
28 parent_dir = os.path.dirname(file_path)
/system/linkerconfig/generator/
Dlibrarylistloader.cc37 Result<LibraryList> GetLibrariesFromFile(std::string file_path) { in GetLibrariesFromFile() argument
38 auto cached_data = library_file_cache.find(file_path); in GetLibrariesFromFile()
45 std::ifstream library_file(file_path.c_str(), std::ifstream::in); in GetLibrariesFromFile()
48 return ErrnoErrorf("Failed to open file {}", file_path); in GetLibrariesFromFile()
58 library_file_cache.insert({file_path, library_list}); in GetLibrariesFromFile()
/system/linkerconfig/modules/tests/
Dapex_testbase.h61 std::string file_path = root + file; in WriteFile() local
62 Mkdir(::android::base::Dirname(file_path)); in WriteFile()
63 ASSERT_TRUE(::android::base::WriteStringToFile(content, file_path)) in WriteFile()
64 << "Failed to write a file: " << file_path; in WriteFile()
/system/update_engine/common/
Dfile_fetcher.cc71 string file_path; in BeginTransfer() local
75 file_path = url; in BeginTransfer()
78 file_path = url.substr(strlen("file://")); in BeginTransfer()
80 brillo::FileStream::Open(base::FilePath(file_path), in BeginTransfer()
87 LOG(ERROR) << "Couldn't open " << file_path; in BeginTransfer()
/system/extras/simpleperf/
Dread_dex_file.cpp72 bool ReadSymbolsFromDexFile(const std::string& file_path, in ReadSymbolsFromDexFile() argument
75 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(file_path.c_str(), O_RDONLY | O_CLOEXEC))); in ReadSymbolsFromDexFile()
79 size_t file_size = GetFileSize(file_path); in ReadSymbolsFromDexFile()
88 return ReadSymbolsFromDexFileInMemory(map->data(), file_size, file_path, dex_file_offsets, in ReadSymbolsFromDexFile()
DJITDebugReader.h59 std::string file_path; member
68 const std::string& file_path, uint64_t file_offset) in JITDebugInfo()
74 file_path(file_path), in JITDebugInfo()
78 const std::string& file_path, in JITDebugInfo()
84 file_path(file_path), in JITDebugInfo()
Ddso_test.cpp190 const std::string file_path = GetUrlInApk(GetTestData(APK_FILE), NATIVELIB_IN_APK); in TEST() local
191 std::unique_ptr<Dso> dso = Dso::CreateDso(DSO_ELF_FILE, file_path); in TEST()
193 ASSERT_EQ(dso->Path(), file_path); in TEST()
194 ASSERT_EQ(dso->GetDebugFilePath(), file_path); in TEST()
204 ASSERT_TRUE(GetBuildIdFromDsoPath(file_path, &build_id)); in TEST()
350 std::string file_path = GetTestData("not_exist_file"); in TEST() local
352 {std::make_pair(file_path, BuildId("1b12a384a9f4a3f3659b7171ca615dbec3a81f71"))}); in TEST()
353 auto dso = Dso::CreateDso(DSO_ELF_FILE, file_path); in TEST()
360 std::string file_path = GetTestData("not_exist_file"); in TEST() local
362 {std::make_pair(file_path, BuildId("1b12a384a9f4a3f3659b7171ca615dbec3a81f71"))}); in TEST()
[all …]
/system/extras/simpleperf/scripts/
Dbinary_cache_builder.py132 def pull_kernel_symbols(self, file_path: Path):
133 if file_path.is_file():
134 file_path.unlink()
137 self.adb.run(['pull', '/proc/kallsyms', file_path])
192 file_path = Path(os.path.join(root, filename))
193 build_id = self.read_build_id(file_path)
196 self.copy_to_binary_cache(file_path, build_id, path)
206 file_path = Path(os.path.join(root, filename))
207 build_id = self.read_build_id(file_path)
212 self.copy_to_binary_cache(file_path, build_id, device_path)
[all …]
/system/tools/aidl/tests/
Dfake_io_delegate.cpp65 const std::string& file_path) const { in GetCodeWriter()
66 if (broken_files_.count(file_path) > 0) { in GetCodeWriter()
69 written_file_contents_[file_path] = ""; in GetCodeWriter()
70 return CodeWriter::ForString(&written_file_contents_[file_path]); in GetCodeWriter()
/system/apex/libs/libapexutil/
Dapexutil_test.cpp55 void WriteFile(std::string file_path, std::string content) { in WriteFile() argument
56 ASSERT_TRUE(WriteStringToFile(content, file_path)) in WriteFile()
57 << "Failed to write a file: " << file_path; in WriteFile()
/system/apex/tools/
Dapexer_wrapper_utils.py20 def GetDigest(file_path: str) -> str:
23 with open(file_path, 'rb') as f:
/system/tools/sysprop/include/
DCommon.h31 const std::string& file_path);
33 const std::string& file_path);
/system/incremental_delivery/incfs/tests/
Dincfs_test.cpp148 const auto file_path = mountPath(test_file_name_); in testWriteBlockAndPageRead() local
150 open(file_path.c_str(), O_RDONLY | O_CLOEXEC | O_BINARY)); in testWriteBlockAndPageRead()
193 const auto file_path = mountPath(test_file_name_); in testWaitForPendingReads() local
194 const android::base::unique_fd fd(open(file_path.c_str(), O_RDONLY | O_CLOEXEC | O_BINARY)); in testWaitForPendingReads()
235 const auto file_path = mountPath(test_file_name_); in TEST_F() local
236 const android::base::unique_fd fd(open(file_path.c_str(), O_RDONLY | O_CLOEXEC | O_BINARY)); in TEST_F()
239 ASSERT_TRUE(isIncFsPath(file_path)); in TEST_F()
352 const auto file_path = mountPath(test_dir_name_, test_file_name_); in TEST_F() local
353 ASSERT_FALSE(exists(file_path)); in TEST_F()
355 makeFile(control_, file_path, 0111, fileId(1), in TEST_F()
[all …]
/system/extras/libjsonpb/verify/include/jsonpb/
Djson_schema_test.h44 virtual std::string file_path() const = 0;
59 std::string file_path() const override { return file_path_; } in file_path() function
74 file_path_ = config->file_path(); in SetUp()
/system/apex/apexer/
Dapexer_test.py112 def get_sha1sum(file_path): argument
115 with open(file_path, 'rb') as file:
188 file_path = os.path.join(dir_name, "bin", i)
189 if os.path.exists(file_path):
190 os.chmod(file_path, stat.S_IRUSR | stat.S_IXUSR);
191 files[i] = file_path
218 file_path = os.path.join(dir_name, i)
219 if os.path.exists(file_path):
220 files[i] = file_path

123