Home
last modified time | relevance | path

Searched refs:partition_name (Results 1 – 25 of 113) sorted by relevance

12345

/system/core/fs_mgr/liblp/include/liblp/
Dpartition_opener.h30 BlockDeviceInfo(const std::string& partition_name, uint64_t size, uint32_t alignment, in BlockDeviceInfo()
36 partition_name(partition_name) {} in BlockDeviceInfo()
50 std::string partition_name; member
60 virtual android::base::unique_fd Open(const std::string& partition_name, int flags) const = 0;
64 virtual bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const = 0;
69 virtual std::string GetDeviceString(const std::string& partition_name) const = 0;
76 virtual android::base::unique_fd Open(const std::string& partition_name,
78 virtual bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const override;
79 virtual std::string GetDeviceString(const std::string& partition_name) const override;
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_verify.cpp77 std::string partition_name = parts[0]; in VerifyUpdatePartition() local
82 partition_name.erase(partition_name.find_last_not_of(suffix_b) + 1); in VerifyUpdatePartition()
83 partition_name.erase(partition_name.find_last_not_of(suffix_a) + 1); in VerifyUpdatePartition()
85 if (dm_block_devices.find(partition_name) == dm_block_devices.end()) { in VerifyUpdatePartition()
86 SNAP_LOG(ERROR) << "Failed to find dm block device for " << partition_name; in VerifyUpdatePartition()
90 if (!VerifyPartition(partition_name, dm_block_devices.at(partition_name))) { in VerifyUpdatePartition()
91 SNAP_LOG(ERROR) << "Partition: " << partition_name in VerifyUpdatePartition()
92 << " Block-device: " << dm_block_devices.at(partition_name) in VerifyUpdatePartition()
98 bool UpdateVerify::VerifyBlocks(const std::string& partition_name, in VerifyBlocks() argument
129 << " partition-name: " << partition_name in VerifyBlocks()
[all …]
/system/core/fs_mgr/libfs_avb/
Davb_util.cpp120 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images) { in GetHashtreeDescriptor() argument
147 if (hashtree_desc->partition_name_len != partition_name.length()) { in GetHashtreeDescriptor()
153 if (hashtree_partition_name == partition_name) { in GetHashtreeDescriptor()
163 LERROR << "Hashtree descriptor not found: " << partition_name; in GetHashtreeDescriptor()
167 hashtree_desc->partition_name = partition_name; in GetHashtreeDescriptor()
184 std::string partition_name = DeriveAvbPartitionName(*fstab_entry, ab_suffix, ab_other_suffix); in LoadAvbHashtreeToEnableVerity() local
186 if (partition_name.empty()) { in LoadAvbHashtreeToEnableVerity()
192 GetHashtreeDescriptor(partition_name, vbmeta_images); in LoadAvbHashtreeToEnableVerity()
234 std::string partition_name; in DeriveAvbPartitionName() local
236 partition_name = fstab_entry.logical_partition_name; in DeriveAvbPartitionName()
[all …]
Davb_util.h33 std::string partition_name; member
37 : partition_name(chain_partition_name), public_key_blob(chain_public_key_blob) {} in ChainInfo()
42 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images);
69 std::unique_ptr<VBMetaData> VerifyVBMetaData(int fd, const std::string& partition_name,
84 bool RollbackDetected(const std::string& partition_name, uint64_t rollback_index);
91 const std::string& image_path, const std::string& partition_name,
100 const std::string& partition_name, const std::string& ab_suffix,
Dfs_avb_util.cpp78 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images) { in GetHashDescriptor() argument
104 if (hash_desc->partition_name_len != partition_name.length()) { in GetHashDescriptor()
110 if (hash_partition_name == partition_name) { in GetHashDescriptor()
120 LERROR << "Hash descriptor not found: " << partition_name; in GetHashDescriptor()
124 hash_desc->partition_name = partition_name; in GetHashDescriptor()
/system/update_engine/aosp/
Dhardware_android.cc61 string GetPartitionBuildDate(const string& partition_name) { in GetPartitionBuildDate() argument
62 return android::base::GetProperty("ro." + partition_name + ".build.date.utc", in GetPartitionBuildDate()
66 ErrorCode IsTimestampNewerLogged(const std::string& partition_name, in IsTimestampNewerLogged() argument
73 << partition_name << " Partition timestamp: " << old_version in IsTimestampNewerLogged()
310 const string& partition_name) const { in GetVersionForLogging()
311 if (partition_name == "boot") { in GetVersionForLogging()
315 return GetPartitionBuildDate(partition_name); in GetVersionForLogging()
319 const string& partition_name, const string& new_version) const { in IsPartitionUpdateValid() argument
320 if (partition_name == "boot") { in IsPartitionUpdateValid()
323 IsTimestampNewerLogged(partition_name, old_version, new_version); in IsPartitionUpdateValid()
[all …]
Ddynamic_partition_test_utils.h94 return os << "{" << p.partition_name() << ", "
185 for (const auto& partition_name : group.partition_names()) { variable
188 builder->AddPartition(partition_name, group.name(), partition_attr));
192 auto p = builder->FindPartition(partition.partition_name());
210 for (const auto& partition_name : group.partition_names()) { in MatchAndExplain() local
211 auto p = metadata->FindPartition(partition_name); in MatchAndExplain()
215 *listener << "No partition " << partition_name; in MatchAndExplain()
223 return p.partition_name() == partition_name; in MatchAndExplain()
226 *listener << "Can't find partition update " << partition_name; in MatchAndExplain()
234 *listener << "Partition " << partition_name << " has size " in MatchAndExplain()
[all …]
Dboot_control_android.cc80 bool BootControlAndroid::GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
85 return dynamic_control_->GetPartitionDevice(partition_name, in GetPartitionDevice()
93 bool BootControlAndroid::GetPartitionDevice(const string& partition_name, in GetPartitionDevice() argument
97 partition_name, slot, false /* not_in_payload */, device, nullptr); in GetPartitionDevice()
173 const std::string& partition_name, in GetPartitionDevice() argument
178 partition_name, slot, current_slot, not_in_payload); in GetPartitionDevice()
/system/core/fastboot/device/
Dflashing.cpp52 void WipeOverlayfsForPartition(FastbootDevice* device, const std::string& partition_name) { in WipeOverlayfsForPartition() argument
55 if (wiped.find(partition_name) != wiped.end()) return; in WipeOverlayfsForPartition()
56 wiped.insert(partition_name); in WipeOverlayfsForPartition()
70 if ((partition + device->GetCurrentSlot()) == partition_name) { in WipeOverlayfsForPartition()
176 int Flash(FastbootDevice* device, const std::string& partition_name) { in Flash() argument
178 if (!OpenPartition(device, partition_name, &handle, O_WRONLY | O_DIRECT)) { in Flash()
193 (partition_name == "boot" || partition_name == "boot_a" || in Flash()
194 partition_name == "boot_b" || partition_name == "init_boot" || in Flash()
195 partition_name == "init_boot_a" || partition_name == "init_boot_b")) { in Flash()
199 WipeOverlayfsForPartition(device, partition_name); in Flash()
[all …]
Dutility.cpp51 bool OpenLogicalPartition(FastbootDevice* device, const std::string& partition_name, in OpenLogicalPartition() argument
53 std::string slot_suffix = GetSuperSlotSuffix(device, partition_name); in OpenLogicalPartition()
63 .partition_name = partition_name, in OpenLogicalPartition()
69 LOG(ERROR) << "Could not map partition: " << partition_name; in OpenLogicalPartition()
72 auto closer = [partition_name]() -> void { DestroyLogicalPartition(partition_name); }; in OpenLogicalPartition()
187 std::string partition_name = GetPartitionName(partition); in ListPartitions() local
188 if (std::find(partitions.begin(), partitions.end(), partition_name) == in ListPartitions()
190 partitions.emplace_back(partition_name); in ListPartitions()
216 std::string GetSuperSlotSuffix(FastbootDevice* device, const std::string& partition_name) { in GetSuperSlotSuffix() argument
227 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in GetSuperSlotSuffix()
Dcommands.cpp234 const auto& partition_name = args[1]; in EraseHandler() local
235 if (IsProtectedPartitionDuringMerge(device, partition_name)) { in EraseHandler()
236 auto message = "Cannot erase " + partition_name + " while a snapshot update is in progress"; in EraseHandler()
241 if (!OpenPartition(device, partition_name, &handle)) { in EraseHandler()
247 if (partition_name == "userdata") { in EraseHandler()
456 explicit PartitionBuilder(FastbootDevice* device, const std::string& partition_name);
469 PartitionBuilder::PartitionBuilder(FastbootDevice* device, const std::string& partition_name) in PartitionBuilder() argument
471 std::string slot_suffix = GetSuperSlotSuffix(device, partition_name); in PartitionBuilder()
499 std::string partition_name = args[1]; in CreatePartitionHandler() local
504 PartitionBuilder builder(device, partition_name); in CreatePartitionHandler()
[all …]
/system/core/fs_mgr/
Dfs_mgr_overlayfs_control.cpp201 const std::string& partition_name, bool was_mounted) { in TeardownDataScratch() argument
205 if (!images->DisableImage(partition_name)) { in TeardownDataScratch()
213 if (!images->UnmapImageIfExists(partition_name)) { in TeardownDataScratch()
216 if (!images->DeleteBackingImage(partition_name)) { in TeardownDataScratch()
273 const auto partition_name = android::base::Basename(kScratchMountPoint); in fs_mgr_overlayfs_teardown_scratch() local
276 if (images && images->BackingImageExists(partition_name)) { in fs_mgr_overlayfs_teardown_scratch()
279 return TeardownDataScratch(images.get(), partition_name, was_mounted); in fs_mgr_overlayfs_teardown_scratch()
292 if (builder->FindPartition(partition_name) == nullptr) { in fs_mgr_overlayfs_teardown_scratch()
295 builder->RemovePartition(partition_name); in fs_mgr_overlayfs_teardown_scratch()
299 if (!DestroyLogicalPartition(partition_name)) { in fs_mgr_overlayfs_teardown_scratch()
[all …]
Dfs_mgr_dm_linear.cpp209 if (android::fs_mgr::GetPartitionName(metadata_partition) == partition_name) { in InitDefaults()
216 LERROR << "Could not find any partition with name: " << partition_name; in InitDefaults()
219 if (partition_name.empty()) { in InitDefaults()
220 partition_name = android::fs_mgr::GetPartitionName(*partition); in InitDefaults()
221 } else if (partition_name != android::fs_mgr::GetPartitionName(*partition)) { in InitDefaults()
222 LERROR << "Inconsistent partition_name " << partition_name << " with partition " in InitDefaults()
228 device_name = partition_name; in InitDefaults()
257 if (!partition_name.empty()) return partition_name; in GetPartitionName()
/system/update_engine/payload_consumer/
Dpartition_update_generator_android.cc56 for (const auto& partition_name : ab_partitions) { in GenerateOperationsForPartitionsNotInPayload() local
57 if (partitions_in_payload.find(partition_name) != in GenerateOperationsForPartitionsNotInPayload()
59 LOG(INFO) << partition_name << " has included in payload"; in GenerateOperationsForPartitionsNotInPayload()
66 boot_control_->GetPartitionDevice(partition_name, in GenerateOperationsForPartitionsNotInPayload()
74 partition_name, target_slot, true, &target_device, &is_target_dynamic)); in GenerateOperationsForPartitionsNotInPayload()
78 LOG(ERROR) << "Partition " << partition_name << " is expected to be a" in GenerateOperationsForPartitionsNotInPayload()
99 partition_name, source_device, target_device, source_size); in GenerateOperationsForPartitionsNotInPayload()
101 LOG(ERROR) << "Failed to create partition update for " << partition_name; in GenerateOperationsForPartitionsNotInPayload()
126 const std::string& partition_name, in CreatePartitionUpdate() argument
131 partition_update.set_partition_name(partition_name); in CreatePartitionUpdate()
/system/core/fs_mgr/libsnapshot/
Dtest_helpers.cpp49 android::base::unique_fd TestPartitionOpener::Open(const std::string& partition_name, in Open() argument
51 if (partition_name == "super") { in Open()
54 return PartitionOpener::Open(partition_name, flags); in Open()
57 bool TestPartitionOpener::GetInfo(const std::string& partition_name, in GetInfo() argument
59 if (partition_name != "super") { in GetInfo()
60 return PartitionOpener::GetInfo(partition_name, info); in GetInfo()
74 std::string TestPartitionOpener::GetDeviceString(const std::string& partition_name) const { in GetDeviceString()
75 if (partition_name == "super") { in GetDeviceString()
78 return PartitionOpener::GetDeviceString(partition_name); in GetDeviceString()
180 for (const auto& partition_name : group.partition_names()) { in FillFakeMetadata() local
[all …]
/system/core/fs_mgr/liblp/
Dpartition_opener.cpp99 device_info->partition_name = android::base::Basename(block_device); in GetBlockDeviceInfo()
111 unique_fd PartitionOpener::Open(const std::string& partition_name, int flags) const { in Open() argument
112 std::string path = GetPartitionAbsolutePath(partition_name); in Open()
116 bool PartitionOpener::GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const { in GetInfo() argument
117 std::string path = GetPartitionAbsolutePath(partition_name); in GetInfo()
121 std::string PartitionOpener::GetDeviceString(const std::string& partition_name) const { in GetDeviceString()
122 return GetPartitionAbsolutePath(partition_name); in GetDeviceString()
Dtest_partition_opener.cpp31 unique_fd TestPartitionOpener::Open(const std::string& partition_name, int flags) const { in Open() argument
32 auto iter = partition_map_.find(partition_name); in Open()
40 bool TestPartitionOpener::GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const { in GetInfo() argument
41 auto iter = partition_info_.find(partition_name); in GetInfo()
Dutility.cpp163 std::string GetPartitionSlotSuffix(const std::string& partition_name) { in GetPartitionSlotSuffix() argument
164 if (partition_name.size() <= 2) { in GetPartitionSlotSuffix()
167 std::string suffix = partition_name.substr(partition_name.size() - 2); in GetPartitionSlotSuffix()
177 if (name.size() > sizeof(device->partition_name)) { in UpdateBlockDevicePartitionName()
180 strncpy(device->partition_name, name.c_str(), sizeof(device->partition_name)); in UpdateBlockDevicePartitionName()
252 std::string partition_name = GetPartitionName(partition); in UpdateMetadataForInPlaceSnapshot() local
253 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in UpdateMetadataForInPlaceSnapshot()
259 partition_name.substr(0, partition_name.size() - slot_suffix.size()) + in UpdateMetadataForInPlaceSnapshot()
270 LWARN << "Removing partition " << partition_name << " from group " in UpdateMetadataForInPlaceSnapshot()
Dbuilder.cpp207 std::string partition_name = builder->GetBlockDevicePartitionName(i); in New() local
209 if (opener->GetInfo(partition_name, &device_info)) { in New()
275 std::string partition_name = in UpdateMetadataForOtherSuper() local
277 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in UpdateMetadataForOtherSuper()
282 << partition_name; in UpdateMetadataForOtherSuper()
286 partition_name.substr(0, partition_name.size() - slot_suffix.size()) + in UpdateMetadataForOtherSuper()
362 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
367 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
372 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
377 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
[all …]
/system/update_engine/common/
Dfake_boot_control.h49 bool GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
55 GetPartitionDevice(partition_name, slot, current_slot_, not_in_payload); in GetPartitionDevice()
68 bool GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
71 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice()
110 void SetPartitionDevice(const std::string& partition_name, in SetPartitionDevice() argument
114 devices_[slot][partition_name] = device; in SetPartitionDevice()
127 const std::string& partition_name,
134 auto device_path = devices_[slot].find(partition_name);
Dfake_hardware.h206 const std::string& partition_name) const override { in GetVersionForLogging() argument
207 return partition_timestamps_[partition_name]; in GetVersionForLogging()
209 void SetVersion(const std::string& partition_name, std::string timestamp) { in SetVersion() argument
210 partition_timestamps_[partition_name] = std::move(timestamp); in SetVersion()
213 const std::string& partition_name, in IsPartitionUpdateValid() argument
215 const auto old_version = GetVersionForLogging(partition_name); in IsPartitionUpdateValid()
220 const std::string& partition_name) const override { in GetPartitionMountOptions() argument
/system/core/fs_mgr/libfs_avb/include/fs_avb/
Dtypes.h59 std::string partition_name; member
65 std::string partition_name; member
75 VBMetaData(const uint8_t* data, size_t size, const std::string& partition_name) in VBMetaData() argument
78 partition_name_(partition_name) { in VBMetaData()
84 explicit VBMetaData(size_t size, const std::string& partition_name) in VBMetaData() argument
87 partition_name_(partition_name) {} in VBMetaData()
/system/extras/partition_tools/
Dlpadd.cc94 unique_fd Open(const std::string& partition_name, int flags) const override { in Open() argument
95 if (partition_name == local_super_) { in Open()
98 return PartitionOpener::Open(partition_name, flags); in Open()
111 bool AddPartition(const std::string& partition_name, const std::string& group_name,
118 bool WritePartition(borrowed_fd fd, uint64_t file_size, const std::string& partition_name);
164 bool SuperHelper::AddPartition(const std::string& partition_name, const std::string& group_name, in AddPartition() argument
172 auto partition = builder_->FindPartition(partition_name); in AddPartition()
174 std::cerr << "Could not find partition to replace: " << partition_name << "\n"; in AddPartition()
177 builder_->RemovePartition(partition_name); in AddPartition()
180 auto partition = builder_->AddPartition(partition_name, group_name, attributes); in AddPartition()
[all …]
/system/core/fs_mgr/libfiemap/
Dmetadata.cpp167 bool RemoveImageMetadata(const std::string& metadata_dir, const std::string& partition_name) { in RemoveImageMetadata() argument
181 builder->RemovePartition(partition_name); in RemoveImageMetadata()
185 bool UpdateMetadata(const std::string& metadata_dir, const std::string& partition_name, in UpdateMetadata() argument
191 auto partition = builder->FindPartition(partition_name); in UpdateMetadata()
196 if ((partition = builder->AddPartition(partition_name, attrs)) == nullptr) { in UpdateMetadata()
197 LOG(ERROR) << "Could not add partition " << partition_name << " to metadata"; in UpdateMetadata()
209 bool AddAttributes(const std::string& metadata_dir, const std::string& partition_name, in AddAttributes() argument
219 auto partition = builder->FindPartition(partition_name); in AddAttributes()
/system/core/fastboot/
Dutil.cpp83 const std::string& partition_name) { in should_flash_in_userspace() argument
90 if (candidate + "_a" == partition_name || candidate + "_b" == partition_name) { in should_flash_in_userspace()
93 } else if (candidate == partition_name) { in should_flash_in_userspace()

12345