mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibPartition: Make EBRPartitionTable kernel/userland agnostic
This commit is contained in:
parent
7e45c3b687
commit
11b4d51fc9
2 changed files with 28 additions and 1 deletions
|
@ -15,12 +15,25 @@ class EBRPartitionTable : public MBRPartitionTable {
|
|||
public:
|
||||
~EBRPartitionTable();
|
||||
|
||||
#ifdef KERNEL
|
||||
static ErrorOr<NonnullOwnPtr<EBRPartitionTable>> try_to_initialize(Kernel::StorageDevice const&);
|
||||
explicit EBRPartitionTable(Kernel::StorageDevice const&);
|
||||
virtual bool is_valid() const override { return m_valid; };
|
||||
#else
|
||||
static ErrorOr<NonnullOwnPtr<EBRPartitionTable>> try_to_initialize(NonnullRefPtr<Core::File>);
|
||||
explicit EBRPartitionTable(NonnullRefPtr<Core::File>);
|
||||
#endif
|
||||
|
||||
virtual bool is_valid() const override
|
||||
{
|
||||
return m_valid;
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef KERNEL
|
||||
void search_extended_partition(Kernel::StorageDevice const&, MBRPartitionTable&, u64, size_t limit);
|
||||
#else
|
||||
void search_extended_partition(NonnullRefPtr<Core::File>, MBRPartitionTable&, u64, size_t limit);
|
||||
#endif
|
||||
|
||||
bool m_valid { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue