/* * Copyright (c) 2020, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #include #ifndef KERNEL # include #endif namespace Partition { PartitionTable::PartitionTable(PartitionableDevice&& device) : m_device(move(device)) { } Optional PartitionTable::partition(unsigned index) const { if (index > partitions_count()) return {}; return m_partitions[index]; } }