aboutsummaryrefslogtreecommitdiff
path: root/kernel/devices/src/storage/StorageManagement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/devices/src/storage/StorageManagement.cpp')
-rw-r--r--kernel/devices/src/storage/StorageManagement.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/devices/src/storage/StorageManagement.cpp b/kernel/devices/src/storage/StorageManagement.cpp
index 58d8510..1b0d2cc 100644
--- a/kernel/devices/src/storage/StorageManagement.cpp
+++ b/kernel/devices/src/storage/StorageManagement.cpp
@@ -16,7 +16,8 @@ namespace devices::storage
namespace
{
constexpr size_t static MINORS_PER_DEVICE = 16;
- constinit size_t static next_free_major = 1;
+ constexpr size_t static START_MAJOR = 1;
+ constinit size_t static next_free_major = START_MAJOR;
constinit auto static active_storage_management = std::optional<storage_management>{};
constinit auto static active_ram_disk_controller = std::optional<ram_disk::ram_disk_controller>{};
@@ -68,4 +69,10 @@ namespace devices::storage
return found;
}
+ auto storage_management::determine_boot_device() -> block_device *
+ {
+ // TODO BA-FS26 better way?
+ return device_by_major_minor(START_MAJOR, 0);
+ }
+
} // namespace devices::storage \ No newline at end of file