mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibPartition: Make EBRPartitionTable kernel/userland agnostic
This commit is contained in:
parent
7e45c3b687
commit
11b4d51fc9
Notes:
sideshowbarker
2024-07-17 08:41:13 +09:00
Author: https://github.com/SamuelBowman
Commit: 11b4d51fc9
Pull-request: https://github.com/SerenityOS/serenity/pull/14432
Reviewed-by: https://github.com/linusg
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