aboutsummaryrefslogtreecommitdiff
path: root/kernel/devices/src/storage/storage_controller.cpp
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-17 11:49:13 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-17 16:44:35 +0100
commit5801be615a50bf465a9663b7f75cafbcf0870f5c (patch)
treee3a6df2863ba9b6b24c76219bc685975be5e69d3 /kernel/devices/src/storage/storage_controller.cpp
parent471888c64ed490b1f1dbaa2c2f67a1e8d315905a (diff)
downloadkernel-5801be615a50bf465a9663b7f75cafbcf0870f5c.tar.xz
kernel-5801be615a50bf465a9663b7f75cafbcf0870f5c.zip
use kstd::vector instead of std::array and replace plain-pointers with kstd::shared_ptr
Diffstat (limited to 'kernel/devices/src/storage/storage_controller.cpp')
-rw-r--r--kernel/devices/src/storage/storage_controller.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/devices/src/storage/storage_controller.cpp b/kernel/devices/src/storage/storage_controller.cpp
index d9bc806..16d40f4 100644
--- a/kernel/devices/src/storage/storage_controller.cpp
+++ b/kernel/devices/src/storage/storage_controller.cpp
@@ -2,8 +2,10 @@
#include "devices/device.hpp"
+#include <kstd/memory>
+#include <kstd/vector>
+
#include <algorithm>
-#include <array>
#include <cstddef>
namespace devices::storage
@@ -19,7 +21,7 @@ namespace devices::storage
return m_major;
}
- auto storage_controller::device_by_minor(size_t minor) const -> device *
+ auto storage_controller::device_by_minor(size_t minor) const -> kstd::shared_ptr<devices::device>
{
auto it = std::ranges::find_if(m_devices, [minor](auto const & device) { return device->minor() == minor; });
@@ -35,7 +37,7 @@ namespace devices::storage
return m_devices.size();
}
- auto storage_controller::all_devices() const -> std::array<devices::device *, 1> const &
+ auto storage_controller::all_devices() const -> kstd::vector<kstd::shared_ptr<devices::device>> const &
{
return m_devices;
}