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

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.
This commit is contained in:
Pankaj Raghav 2022-01-03 16:12:14 +05:30 committed by Brian Gianforcaro
parent 794e82016e
commit 2c810332b6

View file

@ -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