blob: b870abdb19b6f11ac843600c686956d32318b8fb (
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(const StorageDevice& device)
: m_device(device)
{
}
Optional<DiskPartitionMetadata> PartitionTable::partition(unsigned index)
{
if (index > partitions_count())
return {};
return m_partitions[index];
}
}
|