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
commit 5ed3f7c6bf
Notes: sideshowbarker 2024-07-17 11:29:39 +09:00
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;