mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 19:19:44 +03:00
24 lines
436 B
C++
24 lines
436 B
C++
/*
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibPartition/PartitionTable.h>
|
|
|
|
namespace Partition {
|
|
|
|
PartitionTable::PartitionTable(Kernel::StorageDevice const& device)
|
|
: m_device(device)
|
|
{
|
|
}
|
|
|
|
Optional<DiskPartitionMetadata> PartitionTable::partition(unsigned index)
|
|
{
|
|
if (index > partitions_count())
|
|
return {};
|
|
return m_partitions[index];
|
|
}
|
|
|
|
}
|