From 880cd2194507c95449949f799d48a4b8ff3e0cd5 Mon Sep 17 00:00:00 2001 From: Lukas Oesch Date: Tue, 3 Mar 2026 13:52:30 +0100 Subject: implement determine_boot_device --- kernel/devices/src/storage/StorageManagement.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'kernel/devices/src/storage/StorageManagement.cpp') 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{}; constinit auto static active_ram_disk_controller = std::optional{}; @@ -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 -- cgit v1.2.3