summaryrefslogtreecommitdiff
path: root/Kernel/Storage/Partition
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Storage/Partition')
-rw-r--r--Kernel/Storage/Partition/EBRPartitionTable.cpp2
-rw-r--r--Kernel/Storage/Partition/GUIDPartitionTable.cpp2
-rw-r--r--Kernel/Storage/Partition/MBRPartitionTable.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/Kernel/Storage/Partition/EBRPartitionTable.cpp b/Kernel/Storage/Partition/EBRPartitionTable.cpp
index 1dc8c016cf..2d1bdbb895 100644
--- a/Kernel/Storage/Partition/EBRPartitionTable.cpp
+++ b/Kernel/Storage/Partition/EBRPartitionTable.cpp
@@ -11,7 +11,7 @@ namespace Kernel {
Result<NonnullOwnPtr<EBRPartitionTable>, PartitionTable::Error> EBRPartitionTable::try_to_initialize(const StorageDevice& device)
{
- auto table = make<EBRPartitionTable>(device);
+ auto table = adopt_nonnull_own_or_enomem(new (nothrow) EBRPartitionTable(device)).release_value_but_fixme_should_propagate_errors();
if (table->is_protective_mbr())
return { PartitionTable::Error::MBRProtective };
if (!table->is_valid())
diff --git a/Kernel/Storage/Partition/GUIDPartitionTable.cpp b/Kernel/Storage/Partition/GUIDPartitionTable.cpp
index d85e855857..ebb393415f 100644
--- a/Kernel/Storage/Partition/GUIDPartitionTable.cpp
+++ b/Kernel/Storage/Partition/GUIDPartitionTable.cpp
@@ -49,7 +49,7 @@ struct [[gnu::packed]] GUIDPartitionHeader {
Result<NonnullOwnPtr<GUIDPartitionTable>, PartitionTable::Error> GUIDPartitionTable::try_to_initialize(const StorageDevice& device)
{
- auto table = make<GUIDPartitionTable>(device);
+ auto table = adopt_nonnull_own_or_enomem(new (nothrow) GUIDPartitionTable(device)).release_value_but_fixme_should_propagate_errors();
if (!table->is_valid())
return { PartitionTable::Error::Invalid };
return table;
diff --git a/Kernel/Storage/Partition/MBRPartitionTable.cpp b/Kernel/Storage/Partition/MBRPartitionTable.cpp
index 4b6221412a..0c11cf7a70 100644
--- a/Kernel/Storage/Partition/MBRPartitionTable.cpp
+++ b/Kernel/Storage/Partition/MBRPartitionTable.cpp
@@ -17,7 +17,7 @@ namespace Kernel {
Result<NonnullOwnPtr<MBRPartitionTable>, PartitionTable::Error> MBRPartitionTable::try_to_initialize(const StorageDevice& device)
{
- auto table = make<MBRPartitionTable>(device);
+ auto table = adopt_nonnull_own_or_enomem(new (nothrow) MBRPartitionTable(device)).release_value_but_fixme_should_propagate_errors();
if (table->contains_ebr())
return { PartitionTable::Error::ContainsEBR };
if (table->is_protective_mbr())
@@ -29,7 +29,7 @@ Result<NonnullOwnPtr<MBRPartitionTable>, PartitionTable::Error> MBRPartitionTabl
OwnPtr<MBRPartitionTable> MBRPartitionTable::try_to_initialize(const StorageDevice& device, u32 start_lba)
{
- auto table = make<MBRPartitionTable>(device, start_lba);
+ auto table = adopt_nonnull_own_or_enomem(new (nothrow) MBRPartitionTable(device, start_lba)).release_value_but_fixme_should_propagate_errors();
if (!table->is_valid())
return {};
return table;