mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:25:06 +00:00
Kernel+LibPartition: Move GUIDPartitionTable into LibPartition
This commit is contained in:
parent
9053d86b82
commit
25de9de7dc
7 changed files with 17 additions and 25 deletions
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Error.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/Result.h>
|
||||
#include <AK/Types.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibPartition/MBRPartitionTable.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
struct GUIDPartitionHeader;
|
||||
class GUIDPartitionTable final : public Partition::MBRPartitionTable {
|
||||
public:
|
||||
virtual ~GUIDPartitionTable() = default;
|
||||
;
|
||||
|
||||
static ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> try_to_initialize(StorageDevice const&);
|
||||
explicit GUIDPartitionTable(StorageDevice const&);
|
||||
|
||||
virtual bool is_valid() const override { return m_valid; };
|
||||
|
||||
private:
|
||||
bool is_unused_entry(Array<u8, 16>) const;
|
||||
GUIDPartitionHeader const& header() const;
|
||||
bool initialize();
|
||||
|
||||
bool m_valid { true };
|
||||
ByteBuffer m_cached_header;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue