snapuserd: pass arguments by reference
Bug: 193863442 Test: Build Signed-off-by: Akilesh Kailash <akailash@google.com> Change-Id: I5c3ad108b0ae08c411936962fc859415febac2b6
This commit is contained in:
parent
c5c532fc31
commit
9cc14503e0
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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_;
|
||||
|
|
Loading…
Reference in a new issue