diff options
| author | Tom Marshall <tdm@cyngn.com> | 2015-11-04 15:44:44 -0800 |
|---|---|---|
| committer | doc HD <doc.divxm@gmail.com> | 2020-04-11 14:41:38 +0300 |
| commit | 91667a4ea8d6514af1c70f087e289117da62d34f (patch) | |
| tree | eba2f69f8bf65282f0ca819dd131c13f85b9e799 /main.cpp | |
| parent | 6b0b0db03aad7c67c206c33ebae5292ebcc03122 (diff) | |
vold: Support internal storage partitions
* Support nonremovable disks and expose a nonremovable flag in the
DiskCreated message.
* New DiskPartition class to hold single partitions. DiskPartition is
used when the fs_mgr entry has a partnum (eg. when fs_mgr_flags
contains voldmanaged=label:#). Override disk partitioning methods
to prevent destroying the emmc.
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
vold: Correct base header paths
These headers were moved to android-base
Change-Id: I3eaa8316006b9017c5f5e31cd1e91efc2862106d
DiskPartition.cpp: Add sysmacros.h dependency for major/minor
Change-Id: I22c267c8f12b40fb3e2295becd88f12b75907b69
Signed-off-by: Adrian DC <radian.dc@gmail.com>
[mikeioannina] Adapt for Pie and Q
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -242,13 +242,9 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot } if (entry.fs_mgr_flags.vold_managed) { - if (entry.fs_mgr_flags.nonremovable) { - LOG(WARNING) << "nonremovable no longer supported; ignoring volume"; - continue; - } - std::string sysPattern(entry.blk_device); std::string nickname(entry.label); + int partnum = entry.partnum; int flags = 0; if (entry.is_encryptable()) { @@ -259,9 +255,12 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot android::base::GetBoolProperty("vold.debug.default_primary", false)) { flags |= android::vold::Disk::Flags::kDefaultPrimary; } + if (entry.fs_mgr_flags.nonremovable) { + flags |= android::vold::Disk::Flags::kNonRemovable; + } vm->addDiskSource(std::shared_ptr<VolumeManager::DiskSource>( - new VolumeManager::DiskSource(sysPattern, nickname, flags))); + new VolumeManager::DiskSource(sysPattern, nickname, partnum, flags))); } } return 0; |
