Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92701529 authored by Daniel Zheng's avatar Daniel Zheng Committed by Gerrit Code Review
Browse files

Merge changes I19568d11,I08204e2d into main

* changes:
  libsnapshot: update FindResumeOp type
  libsnapshot: v3 writer GetCowSize
parents 41305c38 a5034537
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ bool CowParserV3::ReadResumeBuffer(borrowed_fd fd) {
                                            header_.prefix.header_size + header_.buffer_size);
}

std::optional<uint32_t> CowParserV3::FindResumeOp(const uint32_t label) {
std::optional<uint32_t> CowParserV3::FindResumeOp(const uint64_t label) {
    for (auto& resume_point : *resume_points_) {
        if (resume_point.label == label) {
            return resume_point.op_index;
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ class CowParserV3 final : public CowParserBase {

  private:
    bool ParseOps(android::base::borrowed_fd fd, const uint32_t op_index);
    std::optional<uint32_t> FindResumeOp(const uint32_t label);
    std::optional<uint32_t> FindResumeOp(const uint64_t label);
    off_t GetDataOffset() const;
    CowHeaderV3 header_ = {};
    std::shared_ptr<std::vector<CowOperationV3>> ops_;
+1 −3
Original line number Diff line number Diff line
@@ -360,9 +360,7 @@ bool CowWriterV3::Finalize() {
}

uint64_t CowWriterV3::GetCowSize() {
    LOG(ERROR) << __LINE__ << " " << __FILE__
               << " <- Get Cow Size function here should never be called";
    return 0;
    return next_data_pos_;
}

}  // namespace snapshot