diff --git a/Kernel/Storage/Partition/DiskPartitionMetadata.cpp b/Kernel/Storage/Partition/DiskPartitionMetadata.cpp index 39b97902f4f..7565cc460a9 100644 --- a/Kernel/Storage/Partition/DiskPartitionMetadata.cpp +++ b/Kernel/Storage/Partition/DiskPartitionMetadata.cpp @@ -53,13 +53,12 @@ DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Arr VERIFY(m_type.is_valid()); } -DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Array partition_type, UUID unique_guid, u64 special_attributes, String name) +DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Array partition_type, UUID unique_guid, u64 special_attributes) : m_start_block(start_block) , m_end_block(end_block) , m_type(partition_type) , m_unique_guid(unique_guid) , m_attributes(special_attributes) - , m_name(name) { VERIFY(m_type.is_valid()); VERIFY(!m_unique_guid.is_zero()); @@ -74,26 +73,24 @@ u64 DiskPartitionMetadata::start_block() const { return m_start_block; } + u64 DiskPartitionMetadata::end_block() const { return m_end_block; } + Optional DiskPartitionMetadata::special_attributes() const { if (m_attributes == 0) return {}; return m_attributes; } -Optional DiskPartitionMetadata::name() const -{ - if (m_name.is_null() || m_name.is_empty()) - return {}; - return m_name; -} + const DiskPartitionMetadata::PartitionType& DiskPartitionMetadata::type() const { return m_type; } + const UUID& DiskPartitionMetadata::unique_guid() const { return m_unique_guid; diff --git a/Kernel/Storage/Partition/DiskPartitionMetadata.h b/Kernel/Storage/Partition/DiskPartitionMetadata.h index cd2c7477397..2b1ff22ab1e 100644 --- a/Kernel/Storage/Partition/DiskPartitionMetadata.h +++ b/Kernel/Storage/Partition/DiskPartitionMetadata.h @@ -33,14 +33,13 @@ private: public: DiskPartitionMetadata(u64 block_offset, u64 block_limit, u8 partition_type); DiskPartitionMetadata(u64 start_block, u64 end_block, Array partition_type); - DiskPartitionMetadata(u64 block_offset, u64 block_limit, Array partition_type, UUID unique_guid, u64 special_attributes, String name); + DiskPartitionMetadata(u64 block_offset, u64 block_limit, Array partition_type, UUID unique_guid, u64 special_attributes); u64 start_block() const; u64 end_block() const; DiskPartitionMetadata offset(u64 blocks_count) const; Optional special_attributes() const; - Optional name() const; const PartitionType& type() const; const UUID& unique_guid() const; @@ -50,7 +49,6 @@ private: PartitionType m_type; UUID m_unique_guid {}; u64 m_attributes { 0 }; - String m_name; }; } diff --git a/Kernel/Storage/Partition/GUIDPartitionTable.cpp b/Kernel/Storage/Partition/GUIDPartitionTable.cpp index d9c288ebbdf..f9c99bd0f44 100644 --- a/Kernel/Storage/Partition/GUIDPartitionTable.cpp +++ b/Kernel/Storage/Partition/GUIDPartitionTable.cpp @@ -113,9 +113,8 @@ bool GUIDPartitionTable::initialize() Array unique_guid {}; unique_guid.span().overwrite(0, entry.unique_guid, unique_guid.size()); - String name = entry.partition_name; dbgln("Detected GPT partition (entry={}), offset={}, limit={}", entry_index, entry.first_lba, entry.last_lba); - m_partitions.append({ entry.first_lba, entry.last_lba, partition_type, unique_guid, entry.attributes, "" }); + m_partitions.append({ entry.first_lba, entry.last_lba, partition_type, unique_guid, entry.attributes }); raw_byte_index += header().partition_entry_size; }