libdm: remove libbase dependency in header.

libbase logging macros conflicts with libchrome's logging macros.
Test: compiles

Change-Id: I02697baa87c1466caf2e4ef58b0c8b2635982527
This commit is contained in:
Yifan Hong 2018-08-16 09:36:45 -07:00
parent 5f42ee186d
commit d449e2e59f
4 changed files with 10 additions and 10 deletions

View file

@ -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;

View file

@ -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

View file

@ -23,8 +23,6 @@
#include <string>
#include <vector>
#include <android-base/logging.h>
namespace android {
namespace dm {

View file

@ -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>