diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-21 23:57:49 +0100 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-26 21:17:43 +0100 |
| commit | ac3510bb9f696869f059ecd4ece2c6970fa63b6c (patch) | |
| tree | 7518fe46bad29674550cb98f26eb1d5ca2720fec /kernel/src/main.cpp | |
| parent | c470ca76ce7801a2a4efb03c9ed606b34b368ded (diff) | |
| download | teachos-ac3510bb9f696869f059ecd4ece2c6970fa63b6c.tar.xz teachos-ac3510bb9f696869f059ecd4ece2c6970fa63b6c.zip | |
implement device names with kstd::string
Diffstat (limited to 'kernel/src/main.cpp')
| -rw-r--r-- | kernel/src/main.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index eb699bd..1043c81 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -10,14 +10,26 @@ #include "kernel/filesystem/vfs.hpp" #include "kernel/memory.hpp" +#include <kstd/format> #include <kstd/memory> #include <kstd/os/error.hpp> #include <kstd/print> +#include <kstd/string> #include <kstd/vector> +#include <algorithm> #include <cstddef> #include <cstdint> +auto test_device_names() -> void +{ + auto storage_mgmt = devices::storage::storage_management::get(); + std::ranges::for_each(storage_mgmt.all_controllers(), [](auto const & controller) { + std::ranges::for_each(controller->all_devices(), + [](auto const & device) { kstd::println("{}", device->name().view()); }); + }); +} + auto test_file_description_manually() -> void { // setup @@ -96,6 +108,7 @@ auto test_device_with_vfs() -> void auto run_test_code() -> void { + test_device_names(); test_file_description_manually(); test_device_with_vfs(); } |
