Home
last modified time | relevance | path

Searched refs:file_size (Results 1 – 12 of 12) sorted by relevance

/bootable/recovery/otautil/
Dsysutil.cpp53 uint64_t file_size; in ParseBlockMapFile() local
55 if (sscanf(lines[1].c_str(), "%" SCNu64 "%" SCNu32, &file_size, &blksize) != 2) { in ParseBlockMapFile()
60 if (file_size == 0 || blksize == 0) { in ParseBlockMapFile()
61 LOG(ERROR) << "Invalid size in block map file: size " << file_size << ", blksize " << blksize; in ParseBlockMapFile()
71 uint64_t blocks = ((file_size - 1) / blksize) + 1; in ParseBlockMapFile()
74 LOG(ERROR) << "Invalid data in block map file: size " << file_size << ", blksize " << blksize in ParseBlockMapFile()
102 return BlockMapData(block_dev, file_size, blksize, std::move(ranges)); in ParseBlockMapFile()
132 if (block_map_data.file_size() > std::numeric_limits<size_t>::max()) { in MapBlockFile()
133 LOG(ERROR) << "File size is too large for mmap " << block_map_data.file_size(); in MapBlockFile()
139 uint64_t blocks = ((block_map_data.file_size() - 1) / blksize) + 1; in MapBlockFile()
[all …]
/bootable/recovery/fuse_sideload/include/
Dfuse_provider.h31 FuseDataProvider(uint64_t file_size, uint32_t block_size) in FuseDataProvider() argument
32 : file_size_(file_size), fuse_block_size_(block_size) {} in FuseDataProvider()
36 uint64_t file_size() const { in file_size() function
103 FuseBlockDataProvider(uint64_t file_size, uint32_t fuse_block_size, android::base::unique_fd&& fd,
/bootable/recovery/minadbd/
Dfuse_adb_provider.h26 FuseAdbDataProvider(int fd, uint64_t file_size, uint32_t block_size) in FuseAdbDataProvider() argument
27 : FuseDataProvider(file_size, block_size), fd_(fd) {} in FuseAdbDataProvider()
Dminadbd_services.cpp102 int64_t file_size; in RunAdbFuseSideload() local
104 if (pieces.size() != 2 || !android::base::ParseInt(pieces[0], &file_size) || file_size <= 0 || in RunAdbFuseSideload()
110 LOG(INFO) << "sideload-host file size " << file_size << ", block size " << block_size; in RunAdbFuseSideload()
116 auto adb_data_reader = std::make_unique<FuseAdbDataProvider>(sfd, file_size, block_size); in RunAdbFuseSideload()
/bootable/recovery/tests/unit/
Dsysutil_test.cpp43 ASSERT_EQ(49652, block_map_data.file_size()); in TEST()
78 ASSERT_EQ(42949672950, block_map_data.file_size()); in TEST()
109 constexpr size_t file_size = 4096 * 10; in TEST() local
110 content.reserve(file_size); in TEST()
122 ASSERT_EQ(file_size, mapping.length); in TEST()
130 ASSERT_EQ(file_size, mapping.length); in TEST()
138 ASSERT_EQ(file_size, mapping.length); in TEST()
146 ASSERT_EQ(file_size, mapping.length); in TEST()
Dfuse_sideload_test.cpp36 FuseTestDataProvider(uint64_t file_size, uint32_t block_size) in FuseTestDataProvider() argument
37 : FuseDataProvider(file_size, block_size) {} in FuseTestDataProvider()
Dfuse_provider_test.cpp45 ASSERT_EQ(10000, block_map_data->file_size()); in TEST()
/bootable/recovery/otautil/include/otautil/
Dsysutil.h50 uint64_t file_size() const { in file_size() function
63 BlockMapData(const std::string& path, uint64_t file_size, uint32_t block_size, in BlockMapData() argument
66 file_size_(file_size), in BlockMapData()
/bootable/recovery/fuse_sideload/
Dfuse_sideload.cpp81 uint64_t file_size; // bytes member
173 fill_attr(&(out.attr), fd, PACKAGE_FILE_ID, fd->file_size, S_IFREG | 0444); in handle_getattr()
195 fill_attr(&(out.attr), fd, PACKAGE_FILE_ID, fd->file_size, S_IFREG | 0444); in handle_lookup()
240 if (block * fd->block_size + fetch_size > fd->file_size) { in fetch_block()
243 fetch_size = fd->file_size - (block * fd->block_size); in fetch_block()
349 uint64_t file_size = provider->file_size(); in run_fuse_sideload() local
364 fd.file_size = file_size; in run_fuse_sideload()
366 fd.file_blocks = (file_size == 0) ? 0 : (((file_size - 1) / block_size) + 1); in run_fuse_sideload()
Dfuse_provider.cpp81 FuseBlockDataProvider::FuseBlockDataProvider(uint64_t file_size, uint32_t fuse_block_size, in FuseBlockDataProvider() argument
84 : FuseDataProvider(file_size, fuse_block_size), in FuseBlockDataProvider()
149 new FuseBlockDataProvider(block_map.file_size(), fuse_block_size, std::move(fd), in CreateFromBlockMap()
/bootable/recovery/install/
Dpackage.cpp88 FilePackage(android::base::unique_fd&& fd, uint64_t file_size, const std::string& path,
139 off64_t file_size = lseek64(fd.get(), 0, SEEK_END); in CreateFilePackage() local
140 if (file_size == -1) { in CreateFilePackage()
145 return std::make_unique<FilePackage>(std::move(fd), file_size, path, set_progress); in CreateFilePackage()
215 FilePackage::FilePackage(android::base::unique_fd&& fd, uint64_t file_size, const std::string& path, in FilePackage() argument
217 : fd_(std::move(fd)), package_size_(file_size), path_(path), zip_handle_(nullptr) { in FilePackage()
/bootable/recovery/applypatch/
Dimgdiff.cpp816 size_t file_size = i + 22 + comment_length; in GetZipFileSize() local
817 CHECK_LE(file_size, file_content_.size()); in GetZipFileSize()
818 *input_file_size = file_size; in GetZipFileSize()