diff options
author | Brian Gianforcaro <bgianf@serenityos.org> | 2021-10-02 16:39:33 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-03 13:36:10 +0200 |
commit | 40a58f1fd4531ed79ad24e7c8aa2792832543e50 (patch) | |
tree | 25ba517a3207aa3dbe5da96575941cb8aecb891d /Kernel/Storage | |
parent | 54a2aaaa6f55c43e16790bd470e023bbd1c46f8f (diff) | |
download | serenity-40a58f1fd4531ed79ad24e7c8aa2792832543e50.zip |
Kernel: Remove unused partition name API
I was about to convert this to use KString, but then I realized it
wasn't actually used at all, so lets remove it until the day it is
needed.
Diffstat (limited to 'Kernel/Storage')
-rw-r--r-- | Kernel/Storage/Partition/DiskPartitionMetadata.cpp | 13 | ||||
-rw-r--r-- | Kernel/Storage/Partition/DiskPartitionMetadata.h | 4 | ||||
-rw-r--r-- | Kernel/Storage/Partition/GUIDPartitionTable.cpp | 3 |
3 files changed, 7 insertions, 13 deletions
diff --git a/Kernel/Storage/Partition/DiskPartitionMetadata.cpp b/Kernel/Storage/Partition/DiskPartitionMetadata.cpp index 39b97902f4..7565cc460a 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<u8, 16> partition_type, UUID unique_guid, u64 special_attributes, String name) +DiskPartitionMetadata::DiskPartitionMetadata(u64 start_block, u64 end_block, Array<u8, 16> 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<u64> DiskPartitionMetadata::special_attributes() const { if (m_attributes == 0) return {}; return m_attributes; } -Optional<String> 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 cd2c747739..2b1ff22ab1 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<u8, 16> partition_type); - DiskPartitionMetadata(u64 block_offset, u64 block_limit, Array<u8, 16> partition_type, UUID unique_guid, u64 special_attributes, String name); + DiskPartitionMetadata(u64 block_offset, u64 block_limit, Array<u8, 16> partition_type, UUID unique_guid, u64 special_attributes); u64 start_block() const; u64 end_block() const; DiskPartitionMetadata offset(u64 blocks_count) const; Optional<u64> special_attributes() const; - Optional<String> 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 d9c288ebbd..f9c99bd0f4 100644 --- a/Kernel/Storage/Partition/GUIDPartitionTable.cpp +++ b/Kernel/Storage/Partition/GUIDPartitionTable.cpp @@ -113,9 +113,8 @@ bool GUIDPartitionTable::initialize() Array<u8, 16> 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; } |