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

Commit b5043697 authored by Akilesh Kailash's avatar Akilesh Kailash Committed by Gerrit Code Review
Browse files

Merge "snapuserd: pass arguments by reference"

parents 80fccb3c 9cc14503
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ bool Snapuserd::InitCowDevice() {
}

void Snapuserd::ReadBlocksToCache(const std::string& dm_block_device,
                                  const std::string partition_name, off_t offset, size_t size) {
                                  const std::string& partition_name, off_t offset, size_t size) {
    android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(dm_block_device.c_str(), O_RDONLY)));
    if (fd.get() == -1) {
        SNAP_PLOG(ERROR) << "Error reading " << dm_block_device
@@ -726,7 +726,7 @@ void Snapuserd::ReadBlocksToCache(const std::string& dm_block_device,
                   << " offset: " << offset;
}

void Snapuserd::ReadBlocks(const std::string partition_name, const std::string& dm_block_device) {
void Snapuserd::ReadBlocks(const std::string& partition_name, const std::string& dm_block_device) {
    SNAP_LOG(DEBUG) << "Reading partition: " << partition_name
                    << " Block-Device: " << dm_block_device;

+2 −2
Original line number Diff line number Diff line
@@ -316,8 +316,8 @@ class Snapuserd : public std::enable_shared_from_this<Snapuserd> {
    bool IsBlockAligned(int read_size) { return ((read_size & (BLOCK_SZ - 1)) == 0); }
    struct BufferState* GetBufferState();

    void ReadBlocks(const std::string partition_name, const std::string& dm_block_device);
    void ReadBlocksToCache(const std::string& dm_block_device, const std::string partition_name,
    void ReadBlocks(const std::string& partition_name, const std::string& dm_block_device);
    void ReadBlocksToCache(const std::string& dm_block_device, const std::string& partition_name,
                           off_t offset, size_t size);

    std::string cow_device_;