Merge "libdm: remove libbase dependency in header."

This commit is contained in:
Treehugger Robot 2018-08-22 15:30:43 +00:00 committed by Gerrit Code Review
commit 56d079b40a
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>