/bootable/recovery/otautil/ |
D | sysutil.cpp | 53 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/ |
D | fuse_provider.h | 31 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/ |
D | fuse_adb_provider.h | 26 FuseAdbDataProvider(int fd, uint64_t file_size, uint32_t block_size) in FuseAdbDataProvider() argument 27 : FuseDataProvider(file_size, block_size), fd_(fd) {} in FuseAdbDataProvider()
|
D | minadbd_services.cpp | 102 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/ |
D | sysutil_test.cpp | 43 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()
|
D | fuse_sideload_test.cpp | 36 FuseTestDataProvider(uint64_t file_size, uint32_t block_size) in FuseTestDataProvider() argument 37 : FuseDataProvider(file_size, block_size) {} in FuseTestDataProvider()
|
D | fuse_provider_test.cpp | 45 ASSERT_EQ(10000, block_map_data->file_size()); in TEST()
|
/bootable/recovery/otautil/include/otautil/ |
D | sysutil.h | 50 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/ |
D | fuse_sideload.cpp | 81 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()
|
D | fuse_provider.cpp | 81 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/ |
D | package.cpp | 88 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/ |
D | imgdiff.cpp | 816 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()
|