1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 20:34:59 +00:00
serenity/Kernel/Storage/Partition/PartitionTable.cpp
2022-04-01 21:24:45 +01:00

22 lines
436 B
C++

/*
* 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];
}
}