1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

Kernel/Storage: Migrate the partition code to use the ErrorOr container

That code used the old AK::Result container, which leads to overly
complicated initialization flow when trying to figure out the correct
partition table type. Instead, when using the ErrorOr container the code
is much simpler and more understandable.
This commit is contained in:
Liav A 2022-04-25 19:54:06 +03:00 committed by Linus Groh
parent 19912a0b32
commit 5ed3f7c6bf
9 changed files with 39 additions and 50 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
* Copyright (c) 2020-2022, Liav A. <liavalb@hotmail.co.il>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -45,7 +45,7 @@ private:
void dump_storage_devices_and_partitions() const;
OwnPtr<PartitionTable> try_to_initialize_partition_table(StorageDevice const&) const;
ErrorOr<NonnullOwnPtr<PartitionTable>> try_to_initialize_partition_table(StorageDevice const&) const;
RefPtr<BlockDevice> boot_block_device() const;