Home
last modified time | relevance | path

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

1234

/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()
171 bool FiemapWriter::GetBlockDeviceForFile(const std::string& file_path, std::string* bdev_path, in GetBlockDeviceForFile() argument
174 if (stat(file_path.c_str(), &sb)) { in GetBlockDeviceForFile()
175 PLOG(ERROR) << "Failed to get stat for: " << file_path; in GetBlockDeviceForFile()
227 static uint64_t GetFileSize(const std::string& file_path) { in GetFileSize() argument
229 if (stat(file_path.c_str(), &sb)) { in GetFileSize()
230 PLOG(ERROR) << "Failed to get size for file: " << file_path; in GetFileSize()
237 static bool PerformFileChecks(const std::string& file_path, uint64_t* blocksz, uint32_t* fs_type) { in PerformFileChecks() argument
239 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_metrics.cpp101 const auto& file_path = file.GetPath(); in AddFiles() local
103 if (stat(file_path.c_str(), &stat_buf) == 0) { in AddFiles()
106 PLOG(WARNING) << "Failed to stat " << file_path; in AddFiles()
110 if (auto result = CalculateSha256(file_path); result.ok()) { in AddFiles()
113 LOG(WARNING) << "Unable to get sha256 of " << file_path << ": " in AddFiles()
121 LOG(WARNING) << "Failed to get partition of " << file_path << ": " in AddFiles()
/system/linkerconfig/
Dmain.cc170 std::string file_path) { in WriteConfigurationToFile() argument
174 if (file_path != "") { in WriteConfigurationToFile()
175 file_out.open(file_path); in WriteConfigurationToFile()
177 return ErrnoError() << "Failed to open file " << file_path; in WriteConfigurationToFile()
187 return ErrnoError() << "Failed to write content to " << file_path; in WriteConfigurationToFile()
193 Result<void> UpdatePermission([[maybe_unused]] const std::string& file_path) { in UpdatePermission() argument
196 file_path.c_str(), in UpdatePermission()
199 return ErrnoError() << "Failed to update permission of " << file_path; in UpdatePermission()
294 std::string file_path = ""; in GenerateConfiguration() local
296 file_path = dir_path + "/ld.config.txt"; in GenerateConfiguration()
[all …]
/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
Dwriter_base.cpp43 std::string file_path(512, '\0'); in GetFdPath() local
44 const auto err = readlink(fd_path.c_str(), file_path.data(), file_path.size()); in GetFdPath()
47 file_path.clear(); in GetFdPath()
49 file_path.resize(err); in GetFdPath()
51 return file_path; in GetFdPath()
74 const auto file_path = GetFdPath(fd_); in InitFd() local
83 LOG_INFO << "COW image " << file_path << " has size " << size_in_bytes; in InitFd()
85 LOG_INFO << "COW image " << file_path in InitFd()
/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/memory/mmd/src/zram/
Dsetup.rs51 file_path: &Path, in attach_loop_device()
79 file_path: &Path, in attach_loop_device()
83 file_path, in attach_loop_device()
153 file_path: &Path, in create_zram_writeback_device()
157 File::create(file_path).map_err(WritebackDeviceSetupError::CreateBackingFile)?; in create_zram_writeback_device()
159 let _ = std::fs::remove_file(file_path); in create_zram_writeback_device()
161 std::fs::set_permissions(file_path, Permissions::from_mode(0o600)) in create_zram_writeback_device()
166 let loop_device = S::attach_loop_device(file_path, device_size) in create_zram_writeback_device()
/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/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/chre/tools/
Dfind_improper_target_platform_files.py30 file_path = os.path.join(root, file)
31 if "target_platform" in file_path:
32 target_files.append(file_path)
54 file_path = os.path.join(root, file)
56 with open(file_path, "r") as f:
/system/extras/torq/src/
Dcommand.py147 def __init__(self, type, config_name, file_path, dur_ms, argument
151 self.file_path = file_path
165 def __init__(self, file_path, use_trace_processor): argument
167 self.file_path = file_path
174 return open_trace(self.file_path, WEB_UI_ADDRESS, self.use_trace_processor)
Dtorq.py367 if args.file_path is None:
368 args.file_path = "./" + args.config_name + ".pbtxt"
369 elif not os.path.isfile(args.file_path):
372 % args.file_path),
381 if not path_exists(args.file_path):
384 % args.file_path, "Make sure your file exists.")
414 file_path = None
424 file_path = args.file_path
426 command = ConfigCommand(type, config_name, file_path, dur_ms,
438 return OpenCommand(args.file_path, args.use_trace_processor)
/system/memory/mmd/src/
Dblock_dev.rs53 file_path: P, in configure_block_device_queue_depth()
55 configure_block_device_queue_depth_with_sysfs(device_name, file_path.as_ref(), "/sys") in configure_block_device_queue_depth()
62 file_path: &Path, in configure_block_device_queue_depth_with_sysfs()
65 let file_backing_device = find_backing_block_device(file_path, sysfs_path)?; in configure_block_device_queue_depth_with_sysfs()
80 fn find_backing_block_device(file_path: &Path, sysfs_path: &str) -> Result<String> { in find_backing_block_device()
81 let mut device_name = get_block_device_name(file_path, sysfs_path)?; in find_backing_block_device()
95 fn get_block_device_name(file_path: &Path, sysfs_path: &str) -> Result<String> { in get_block_device_name()
97 fs::metadata(file_path).map_err(BlockDeviceError::InputFileMetadata)?.dev() as libc::dev_t; in get_block_device_name()
200 Self::BackingDevice(file_path, device_path) => { in build()
202 let devnum = fs::metadata(file_path).unwrap().dev() as libc::dev_t; in build()
/system/apex/tools/
Dbrand_new_apex_verifier.py96 for file_path in pubkey_paths:
97 if not os.path.exists(file_path):
100 with open(file_path, 'rb') as f:
106 pubkeys[file_content] = 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.cc68 string file_path; in BeginTransfer() local
72 file_path = url; in BeginTransfer()
75 file_path = url.substr(strlen("file://")); in BeginTransfer()
77 brillo::FileStream::Open(base::FilePath(file_path), in BeginTransfer()
84 LOG(ERROR) << "Couldn't open " << file_path; in BeginTransfer()
/system/extras/simpleperf/
Dread_dex_file.cpp73 bool ReadSymbolsFromDexFile(const std::string& file_path, in ReadSymbolsFromDexFile() argument
76 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(file_path.c_str(), O_RDONLY | O_CLOEXEC))); in ReadSymbolsFromDexFile()
80 size_t file_size = GetFileSize(file_path); in ReadSymbolsFromDexFile()
89 return ReadSymbolsFromDexFileInMemory(map->data(), file_size, file_path, dex_file_offsets, in ReadSymbolsFromDexFile()
DJITDebugReader.h106 std::string file_path; member
118 const std::string& file_path, uint64_t file_offset) in JITDebugInfo()
124 file_path(file_path), in JITDebugInfo()
128 const std::string& file_path, const std::shared_ptr<ThreadMmap>& dex_file_map, in JITDebugInfo()
134 file_path(file_path), in JITDebugInfo()
/system/extras/simpleperf/scripts/
Dbinary_cache_builder.py135 def pull_kernel_symbols(self, file_path: Path):
136 if file_path.is_file():
137 file_path.unlink()
140 self.adb.run(['pull', '/proc/kallsyms', file_path])
195 file_path = Path(os.path.join(root, filename))
196 build_id = self.read_build_id(file_path)
199 self.copy_to_binary_cache(file_path, build_id, path)
209 file_path = Path(os.path.join(root, filename))
210 build_id = self.read_build_id(file_path)
215 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/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/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()

1234