1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 21:48:11 +00:00

Kernel+LibPartition: Move PartitionTable into LibPartition

This commit is contained in:
Samuel Bowman 2022-03-01 18:09:46 -05:00 committed by Linus Groh
parent be1c5c6b9f
commit 940dde9947
8 changed files with 42 additions and 43 deletions

View file

@ -1,22 +0,0 @@
/*
* 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<Partition::DiskPartitionMetadata> PartitionTable::partition(unsigned index)
{
if (index > partitions_count())
return {};
return m_partitions[index];
}
}