Loading fs_mgr/libdm/dm.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,13 @@ bool DeviceMapper::CreateDevice(const std::string& name, const std::string& uuid return true; } bool DeviceMapper::DeleteDeviceIfExists(const std::string& name) { if (GetState(name) == DmDeviceState::INVALID) { return true; } return DeleteDevice(name); } bool DeviceMapper::DeleteDevice(const std::string& name) { struct dm_ioctl io; InitIo(&io, name); Loading fs_mgr/libdm/include/libdm/dm.h +1 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ class DeviceMapper final { // Removes a device mapper device with the given name. // Returns 'true' on success, false otherwise. bool DeleteDevice(const std::string& name); bool DeleteDeviceIfExists(const std::string& name); // Fetches and returns the complete state of the underlying device mapper // device with given name. Loading Loading
fs_mgr/libdm/dm.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,13 @@ bool DeviceMapper::CreateDevice(const std::string& name, const std::string& uuid return true; } bool DeviceMapper::DeleteDeviceIfExists(const std::string& name) { if (GetState(name) == DmDeviceState::INVALID) { return true; } return DeleteDevice(name); } bool DeviceMapper::DeleteDevice(const std::string& name) { struct dm_ioctl io; InitIo(&io, name); Loading
fs_mgr/libdm/include/libdm/dm.h +1 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ class DeviceMapper final { // Removes a device mapper device with the given name. // Returns 'true' on success, false otherwise. bool DeleteDevice(const std::string& name); bool DeleteDeviceIfExists(const std::string& name); // Fetches and returns the complete state of the underlying device mapper // device with given name. Loading