mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibPartition: Make GUIDPartitionTable kernel/userland agnostic
This commit is contained in:
parent
11b4d51fc9
commit
380ce43afc
2 changed files with 42 additions and 11 deletions
|
@ -15,10 +15,18 @@ class GUIDPartitionTable final : public MBRPartitionTable {
|
|||
public:
|
||||
virtual ~GUIDPartitionTable() = default;
|
||||
|
||||
#ifdef KERNEL
|
||||
static ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> try_to_initialize(Kernel::StorageDevice const&);
|
||||
explicit GUIDPartitionTable(Kernel::StorageDevice const&);
|
||||
#else
|
||||
static ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> try_to_initialize(NonnullRefPtr<Core::File>);
|
||||
explicit GUIDPartitionTable(NonnullRefPtr<Core::File>);
|
||||
#endif
|
||||
|
||||
virtual bool is_valid() const override { return m_valid; };
|
||||
virtual bool is_valid() const override
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
private:
|
||||
bool is_unused_entry(Array<u8, 16>) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue