summaryrefslogtreecommitdiff
path: root/Kernel/Storage
diff options
context:
space:
mode:
authorPankaj Raghav <pankydev8@gmail.com>2022-01-03 16:12:14 +0530
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-09 20:18:37 -0800
commit2c810332b63ad750172981d6c8d3cd12101a0c26 (patch)
tree8deb25d8848145905fb9b9080875a99fdfc9fb62 /Kernel/Storage
parent794e82016e1c3128b01ddf949e6ac2d17d1f1da9 (diff)
downloadserenity-2c810332b63ad750172981d6c8d3cd12101a0c26.zip
Kernel: Add add_partition function
Until now partitions were added directly by accessing the private member of the StorageDevice class. Add a new member function to add partition.
Diffstat (limited to 'Kernel/Storage')
-rw-r--r--Kernel/Storage/StorageDevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Storage/StorageDevice.h b/Kernel/Storage/StorageDevice.h
index 8472009669..4f3555e0bc 100644
--- a/Kernel/Storage/StorageDevice.h
+++ b/Kernel/Storage/StorageDevice.h
@@ -48,6 +48,8 @@ public:
NonnullRefPtrVector<DiskPartition> const& partitions() const { return m_partitions; }
+ void add_partition(NonnullRefPtr<DiskPartition> disk_partition) { MUST(m_partitions.try_append(disk_partition)); }
+
virtual CommandSet command_set() const = 0;
// ^File