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

Commit 22a01eed authored by David Anderson's avatar David Anderson Committed by android-build-merger
Browse files

Merge "libfiemap_writer: Fix bugs in vfat handling."

am: 7f6d6db2

Change-Id: I654e9ce9b72ad9f52a7324b36fe227e1750ae741
parents 0e505123 7f6d6db2
Loading
Loading
Loading
Loading
+6 −5
Original line number Original line Diff line number Diff line
@@ -501,11 +501,12 @@ static bool ReadFibmap(int file_fd, const std::string& file_path,
        }
        }


        if (!extents->empty() && block == last_block + 1) {
        if (!extents->empty() && block == last_block + 1) {
            extents->back().fe_length++;
            extents->back().fe_length += s.st_blksize;
        } else {
        } else {
            extents->push_back(fiemap_extent{.fe_logical = block_number,
            extents->push_back(
                                             .fe_physical = block,
                    fiemap_extent{.fe_logical = block_number,
                                             .fe_length = 1,
                                  .fe_physical = static_cast<uint64_t>(block) * s.st_blksize,
                                  .fe_length = static_cast<uint64_t>(s.st_blksize),
                                  .fe_flags = 0});
                                  .fe_flags = 0});
        }
        }
        last_block = block;
        last_block = block;