/* * Copyright (c) 2020, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Kernel { struct GUIDPartitionHeader; class GUIDPartitionTable final : public MBRPartitionTable { public: virtual ~GUIDPartitionTable() = default; ; static Result, PartitionTable::Error> try_to_initialize(const StorageDevice&); explicit GUIDPartitionTable(const StorageDevice&); virtual bool is_valid() const override { return m_valid; }; private: bool is_unused_entry(Array) const; const GUIDPartitionHeader& header() const; bool initialize(); bool m_valid { true }; ByteBuffer m_cached_header; }; }