diff options
author | Sandeep Dhavale <dhavale@google.com> | 2024-04-23 21:19:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-04-23 21:19:54 +0000 |
commit | 5080f93ced2c132b96a775550e62dbc7d3f8770c (patch) | |
tree | 1e506a2910667eb66b456f30704d66b7d9a687e9 | |
parent | bbc0bef481bda6dcafe44efff16395fff4f92118 (diff) | |
parent | 897f8fa1e39e126a592460804529afa857d9e36f (diff) | |
download | extras-master.tar.gz |
-rw-r--r-- | partition_tools/dynamic_partitions_device_info.proto | 12 | ||||
-rw-r--r-- | partition_tools/lpdump.cc | 6 |
2 files changed, 17 insertions, 1 deletions
diff --git a/partition_tools/dynamic_partitions_device_info.proto b/partition_tools/dynamic_partitions_device_info.proto index 8800dac7..82d20098 100644 --- a/partition_tools/dynamic_partitions_device_info.proto +++ b/partition_tools/dynamic_partitions_device_info.proto @@ -20,7 +20,7 @@ package android; // Keep in sync with proto files on EDI backend. Otherwise, new fields will // go ignored. -// Next: 6 +// Next: 7 message DynamicPartitionsDeviceInfoProto { bool enabled = 1; bool retrofit = 2; @@ -57,4 +57,14 @@ message DynamicPartitionsDeviceInfoProto { uint64 alignment_offset = 5 [json_name = "alignment_offset"]; } repeated BlockDevice block_devices = 5 [json_name = "block_devices"]; + + // Next: 4 + message SuperDevice { + string name = 1; + /** Used space in bytes */ + uint64 used_size = 2 [json_name = "used_size"]; + /** Total size of the super in bytes */ + uint64 total_size = 3 [json_name = "total_size"]; + } + SuperDevice super_device = 6 [json_name = "super_device"]; } diff --git a/partition_tools/lpdump.cc b/partition_tools/lpdump.cc index 97682940..4c1fe954 100644 --- a/partition_tools/lpdump.cc +++ b/partition_tools/lpdump.cc @@ -173,6 +173,12 @@ static bool MergeMetadata(const LpMetadata* metadata, block_device_proto->set_alignment(info.alignment); block_device_proto->set_alignment_offset(info.alignment_offset); } + + auto super_device_proto = proto->mutable_super_device(); + super_device_proto->set_name(GetSuperPartitionName()); + super_device_proto->set_used_size(builder->UsedSpace()); + super_device_proto->set_total_size(GetTotalSuperPartitionSize(*metadata)); + return true; } |