blob: 1731ef63b4804a044253d866ed8f3fddcd3e82e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Storage/Partition/PartitionTable.h>
namespace Kernel {
PartitionTable::PartitionTable(StorageDevice const& device)
: m_device(device)
{
}
Optional<DiskPartitionMetadata> PartitionTable::partition(unsigned index)
{
if (index > partitions_count())
return {};
return m_partitions[index];
}
}
|