/bootable/recovery/tests/unit/ |
D | rangeset_test.cpp | 29 RangeSet rs(std::vector<Range>{ Range{ 8, 10 }, Range{ 1, 5 } }); in TEST() 32 RangeSet rs2(std::vector<Range>{}); in TEST() 35 RangeSet rs3(std::vector<Range>{ Range{ 8, 10 }, Range{ 5, 1 } }); in TEST() 40 RangeSet rs = RangeSet::Parse("2,1,10"); in TEST() 45 RangeSet rs2 = RangeSet::Parse("4,15,20,1,10"); in TEST() 52 ASSERT_EQ(rs, RangeSet::Parse(" 2, 1, 10")); in TEST() 53 ASSERT_FALSE(RangeSet::Parse("2,1,10 ")); in TEST() 58 ASSERT_FALSE(RangeSet::Parse("")); in TEST() 59 ASSERT_FALSE(RangeSet::Parse("2,1")); in TEST() 62 ASSERT_FALSE(RangeSet::Parse("a,1,1")); in TEST() [all …]
|
D | fuse_provider_test.cpp | 47 ASSERT_EQ(RangeSet({ { 10, 11 }, { 20, 21 }, { 22, 23 } }), in TEST()
|
D | sysutil_test.cpp | 45 ASSERT_EQ(RangeSet(std::vector<Range>{ in TEST()
|
/bootable/deprecated-ota/tests/unit/ |
D | commands_test.cpp | 58 RangeSet({ { 569884, 569904 }, { 591946, 592043 } })), in TEST() 61 RangeSet({ { 566779, 566799 }, { 591946, 592043 } }), {}, {}), in TEST() 80 TargetInfo("6ebcf8cf1f6be0bc49e7d4a864214251925d1d15", RangeSet({ { 350729, 350731 } })), in TEST() 85 StashInfo("6ebcf8cf1f6be0bc49e7d4a864214251925d1d15", RangeSet({ { 0, 2 } })), in TEST() 106 RangeSet({ { 611641, 611643 }, { 636981, 637075 } })), in TEST() 110 RangeSet({ { 636981, 637075 }, { 770665, 770666 } }), // source ranges in TEST() 111 RangeSet({ { 0, 94 }, { 95, 96 } }), // source location in TEST() 113 StashInfo("9eedf00d11061549e32503cadf054ec6fbfa7a23", RangeSet({ { 94, 95 } })), in TEST() 204 RangeSet({ { 565704, 565752 }, { 566779, 566799 } })), in TEST() 207 RangeSet({ { 64525, 64545 }, { 565704, 565752 } }), RangeSet(), {}), in TEST() [all …]
|
/bootable/recovery/otautil/include/otautil/ |
D | rangeset.h | 28 class RangeSet { 30 RangeSet() : blocks_(0) {} in RangeSet() function 32 explicit RangeSet(std::vector<Range>&& pairs); 36 static RangeSet Parse(const std::string& range_text); 51 bool Overlaps(const RangeSet& other) const; 57 std::optional<RangeSet> GetSubRanges(size_t start_index, size_t num_of_blocks) const; 65 std::vector<RangeSet> Split(size_t groups) const; 119 bool operator==(const RangeSet& other) const { 124 bool operator!=(const RangeSet& other) const { 144 class SortedRangeSet : public RangeSet { [all …]
|
D | sysutil.h | 56 RangeSet block_ranges() const { in block_ranges() 64 RangeSet block_ranges) in BlockMapData() 73 RangeSet block_ranges_;
|
/bootable/recovery/otautil/ |
D | rangeset.cpp | 32 RangeSet::RangeSet(std::vector<Range>&& pairs) { in RangeSet() function in RangeSet 47 RangeSet RangeSet::Parse(const std::string& range_text) { in Parse() 82 return RangeSet(std::move(pairs)); in Parse() 85 bool RangeSet::PushBack(Range range) { in PushBack() 101 void RangeSet::Clear() { in Clear() 106 std::vector<RangeSet> RangeSet::Split(size_t groups) const { in Split() 118 std::vector<RangeSet> result; in Split() 124 RangeSet buffer; in Split() 146 std::string RangeSet::ToString() const { in ToString() 159 size_t RangeSet::GetBlockNumber(size_t idx) const { in GetBlockNumber() [all …]
|
D | sysutil.cpp | 79 RangeSet ranges; in ParseBlockMapFile()
|
/bootable/deprecated-ota/updater/include/private/ |
D | commands.h | 36 TargetInfo(std::string hash, RangeSet ranges) in TargetInfo() 43 const RangeSet& ranges() const { in ranges() 61 RangeSet ranges_; 71 StashInfo(std::string id, RangeSet ranges) : id_(std::move(id)), ranges_(std::move(ranges)) {} in StashInfo() 81 const RangeSet& ranges() const { in ranges() 95 RangeSet ranges_; 106 SourceInfo(std::string hash, RangeSet ranges, RangeSet location, std::vector<StashInfo> stashes) in SourceInfo() 124 const std::function<int(const RangeSet&, std::vector<uint8_t>*)>& block_reader, 154 RangeSet ranges_; 157 RangeSet location_; [all …]
|
/bootable/deprecated-ota/updater/ |
D | commands.cpp | 99 RangeSet tgt_ranges = RangeSet::Parse(tokens[pos++]); in ParseTargetInfoAndSourceInfo() 114 RangeSet src_ranges; in ParseTargetInfoAndSourceInfo() 115 RangeSet src_ranges_location; in ParseTargetInfoAndSourceInfo() 121 src_ranges = RangeSet::Parse(tokens[pos++]); in ParseTargetInfoAndSourceInfo() 142 src_ranges_location = RangeSet::Parse(tokens[pos++]); in ParseTargetInfoAndSourceInfo() 159 RangeSet stash_location = RangeSet::Parse(pairs[1]); in ParseTargetInfoAndSourceInfo() 200 RangeSet tgt_ranges = RangeSet::Parse(tokens[pos++]); in Parse() 214 RangeSet src_ranges = RangeSet::Parse(tokens[pos++]); in Parse() 279 RangeSet hash_tree_ranges = RangeSet::Parse(tokens[pos++]); in Parse() 285 RangeSet source_ranges = RangeSet::Parse(tokens[pos++]); in Parse() [all …]
|
D | blockimg.cpp | 82 static std::unordered_map<std::string, RangeSet> stash_map; 235 RangeSinkWriter(int fd, const RangeSet& tgt) in RangeSinkWriter() 322 const RangeSet& tgt_; 482 static int ReadBlocks(const RangeSet& src, std::vector<uint8_t>* buffer, int fd) { in ReadBlocks() 502 static int WriteBlocks(const RangeSet& tgt, const std::vector<uint8_t>& buffer, int fd) { in WriteBlocks() 584 RangeSet src = RangeSet::Parse(params.tokens[pos++]); in PrintHashForCorruptedSourceBlocks() 590 RangeSet locs; in PrintHashForCorruptedSourceBlocks() 594 locs = RangeSet(std::vector<Range>{ Range{ 0, src.blocks() } }); in PrintHashForCorruptedSourceBlocks() 600 locs = RangeSet::Parse(params.tokens[pos++]); in PrintHashForCorruptedSourceBlocks() 621 const RangeSet& src) { in PrintHashForCorruptedStashedBlocks() [all …]
|
/bootable/recovery/fuse_sideload/include/ |
D | fuse_provider.h | 89 RangeSet ranges() const { in ranges() 104 uint32_t source_block_size, RangeSet ranges); 110 RangeSet ranges_;
|
/bootable/recovery/update_verifier/include/update_verifier/ |
D | update_verifier.h | 59 const RangeSet& ranges); 65 std::map<std::string, RangeSet> partition_map_;
|
/bootable/recovery/update_verifier/ |
D | update_verifier.cpp | 135 const std::string& dm_block_device, const RangeSet& ranges) { in ReadBlocks() 139 std::vector<RangeSet> groups = ranges.Split(thread_num); in ReadBlocks() 270 RangeSet ranges = RangeSet::Parse(partition.ranges()); in ParseCareMap()
|
/bootable/recovery/fuse_sideload/ |
D | fuse_provider.cpp | 83 uint32_t source_block_size, RangeSet ranges) in FuseBlockDataProvider()
|