diff options
author | Pankaj Raghav <pankydev8@gmail.com> | 2022-01-03 16:12:14 +0530 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-09 20:18:37 -0800 |
commit | 2c810332b63ad750172981d6c8d3cd12101a0c26 (patch) | |
tree | 8deb25d8848145905fb9b9080875a99fdfc9fb62 /Kernel/Storage | |
parent | 794e82016e1c3128b01ddf949e6ac2d17d1f1da9 (diff) | |
download | serenity-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.h | 2 |
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 |