diff options
author | David Anderson <dvander@google.com> | 2020-03-02 20:31:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-02 20:31:56 +0000 |
commit | acb49fd07d328d6cb87fd8d9bdf49fbbaffe58a4 (patch) | |
tree | dfe2d0f243f8e9702b683707997994f619728a0f | |
parent | efab99063d599bd6e6e4354b1627e71a6f4044a4 (diff) | |
parent | c4bf521d09925e5c28fc6c9b04583540ce2be8ff (diff) |
Merge changes Iac986bca,I0f40b1f2 into rvc-dev
* changes:
snapshotctl: Not necessary to link to libdm.
libdm: Make static std::string inline for DmTargetDefaultKey.
-rw-r--r-- | fs_mgr/libdm/dm_target.cpp | 4 | ||||
-rw-r--r-- | fs_mgr/libdm/include/libdm/dm_target.h | 5 | ||||
-rw-r--r-- | fs_mgr/libsnapshot/Android.bp | 1 |
3 files changed, 4 insertions, 6 deletions
diff --git a/fs_mgr/libdm/dm_target.cpp b/fs_mgr/libdm/dm_target.cpp index 646178891..29b103282 100644 --- a/fs_mgr/libdm/dm_target.cpp +++ b/fs_mgr/libdm/dm_target.cpp @@ -243,12 +243,10 @@ std::string DmTargetCrypt::GetParameterString() const { return android::base::Join(argv, " "); } -const std::string DmTargetDefaultKey::name_ = "default-key"; - bool DmTargetDefaultKey::IsLegacy(bool* result) { DeviceMapper& dm = DeviceMapper::Instance(); DmTargetTypeInfo info; - if (!dm.GetTargetByName(name_, &info)) return false; + if (!dm.GetTargetByName(kName, &info)) return false; // dm-default-key was modified to be like dm-crypt with version 2 *result = !info.IsAtLeast(2, 0, 0); return true; diff --git a/fs_mgr/libdm/include/libdm/dm_target.h b/fs_mgr/libdm/include/libdm/dm_target.h index d2e50d321..050d0b645 100644 --- a/fs_mgr/libdm/include/libdm/dm_target.h +++ b/fs_mgr/libdm/include/libdm/dm_target.h @@ -287,7 +287,7 @@ class DmTargetDefaultKey final : public DmTarget { blockdev_(blockdev), start_sector_(start_sector) {} - std::string name() const override { return name_; } + std::string name() const override { return kName; } bool Valid() const override; std::string GetParameterString() const override; static bool IsLegacy(bool* result); @@ -296,7 +296,8 @@ class DmTargetDefaultKey final : public DmTarget { void SetWrappedKeyV0() { is_hw_wrapped_ = true; } private: - static const std::string name_; + inline static const std::string kName = "default-key"; + std::string cipher_; std::string key_; std::string blockdev_; diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp index 63bdcc52b..2d6261731 100644 --- a/fs_mgr/libsnapshot/Android.bp +++ b/fs_mgr/libsnapshot/Android.bp @@ -222,7 +222,6 @@ cc_binary { "snapshotctl.cpp", ], static_libs: [ - "libdm", "libfstab", "libsnapshot", ], |