mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
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.
This commit is contained in:
parent
54a2aaaa6f
commit
40a58f1fd4
Notes:
sideshowbarker
2024-07-18 03:09:25 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/40a58f1fd45 Pull-request: https://github.com/SerenityOS/serenity/pull/10325 Reviewed-by: https://github.com/BenWiederhake
3 changed files with 7 additions and 13 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue