1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

LibPartition: Make Kernel parts const-correct re: StorageDevice&

We can't do I/O with a const StorageDevice&, so it has to be non-const.
This commit is contained in:
Andreas Kling 2023-02-19 23:36:30 +01:00
parent c837e7bbf3
commit 456f12c5c8
8 changed files with 20 additions and 20 deletions

View file

@ -49,7 +49,7 @@ struct [[gnu::packed]] GUIDPartitionHeader {
};
#ifdef KERNEL
ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> GUIDPartitionTable::try_to_initialize(Kernel::StorageDevice const& device)
ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> GUIDPartitionTable::try_to_initialize(Kernel::StorageDevice& device)
{
auto table = TRY(adopt_nonnull_own_or_enomem(new (nothrow) GUIDPartitionTable(device)));
#else
@ -63,7 +63,7 @@ ErrorOr<NonnullOwnPtr<GUIDPartitionTable>> GUIDPartitionTable::try_to_initialize
}
#ifdef KERNEL
GUIDPartitionTable::GUIDPartitionTable(Kernel::StorageDevice const& device)
GUIDPartitionTable::GUIDPartitionTable(Kernel::StorageDevice& device)
: MBRPartitionTable(device)
#else
GUIDPartitionTable::GUIDPartitionTable(NonnullRefPtr<Core::DeprecatedFile> device_file)