Merge "libdm: remove libbase dependency in header."
This commit is contained in:
commit
56d079b40a
|
@ -20,11 +20,19 @@
|
|||
#include <sys/sysmacros.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/macros.h>
|
||||
|
||||
namespace android {
|
||||
namespace dm {
|
||||
|
||||
DeviceMapper::DeviceMapper() : fd_(-1) {
|
||||
fd_ = TEMP_FAILURE_RETRY(open("/dev/device-mapper", O_RDWR | O_CLOEXEC));
|
||||
if (fd_ < 0) {
|
||||
PLOG(ERROR) << "Failed to open device-mapper";
|
||||
}
|
||||
}
|
||||
|
||||
DeviceMapper& DeviceMapper::Instance() {
|
||||
static DeviceMapper instance;
|
||||
return instance;
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include "dm_table.h"
|
||||
|
||||
// The minimum expected device mapper major.minor version
|
||||
|
@ -144,12 +142,7 @@ class DeviceMapper final {
|
|||
|
||||
void InitIo(struct dm_ioctl* io, const std::string& name = std::string()) const;
|
||||
|
||||
DeviceMapper() : fd_(-1) {
|
||||
fd_ = TEMP_FAILURE_RETRY(open("/dev/device-mapper", O_RDWR | O_CLOEXEC));
|
||||
if (fd_ < 0) {
|
||||
PLOG(ERROR) << "Failed to open device-mapper";
|
||||
}
|
||||
}
|
||||
DeviceMapper();
|
||||
|
||||
// Creates a device mapper device with given name.
|
||||
// Return 'true' on success and 'false' on failure to
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
|
||||
namespace android {
|
||||
namespace dm {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/parseint.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <libdm/dm.h>
|
||||
|
|
Loading…
Reference in New Issue