Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
// for managing buffered readers/writers
virtual int invalidate_cache(uint64_t off, uint64_t len) = 0;
- virtual int open(string path) = 0;
+ virtual int open(const string& path) = 0;
virtual void close() = 0;
};
return 0;
}
-int KernelDevice::open(string p)
+int KernelDevice::open(const string& p)
{
path = p;
int r = 0;
// for managing buffered readers/writers
int invalidate_cache(uint64_t off, uint64_t len) override;
- int open(string path) override;
+ int open(const string& path) override;
void close() override;
};
}
-int NVMEDevice::open(string p)
+int NVMEDevice::open(const string& p)
{
int r = 0;
dout(1) << __func__ << " path " << p << dendl;
// for managing buffered readers/writers
int invalidate_cache(uint64_t off, uint64_t len) override;
- int open(string path) override;
+ int open(const string& path) override;
void close() override;
};