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