diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-20 22:27:26 +0100 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-26 21:17:30 +0100 |
| commit | be44d4b778bb7c3a947af4cae610ecc3b8851672 (patch) | |
| tree | 2dbee85f2ccc9e9597e1df368312d50504e7c879 /kernel/src/main.cpp | |
| parent | a396b71827a24f9d6c8010fd85b9afd9d86b6e2a (diff) | |
| download | teachos-be44d4b778bb7c3a947af4cae610ecc3b8851672.tar.xz teachos-be44d4b778bb7c3a947af4cae610ecc3b8851672.zip | |
use kstd::shared_ptr instead of std::optional for open_file_descriptions
Diffstat (limited to 'kernel/src/main.cpp')
| -rw-r--r-- | kernel/src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp index e719164..31133a5 100644 --- a/kernel/src/main.cpp +++ b/kernel/src/main.cpp @@ -26,7 +26,7 @@ auto test_file_description_manually() -> void auto device = storage_mgmt.device_by_major_minor(1, 0); auto dev_file = kstd::make_shared<filesystem::device_file>(device); - filesystem::open_file_description ofd(dev_file); + auto ofd = kstd::make_shared<filesystem::open_file_description>(dev_file); auto fd_index = fd_table.add_file(ofd); // use: read two bytes and write two again @@ -61,7 +61,7 @@ auto test_file_description_manually() -> void fd_table.remove_file(fd_index); // use: read four bytes again -> two old bytes two new bytes - filesystem::open_file_description ofd1(dev_file); + auto ofd1 = kstd::make_shared<filesystem::open_file_description>(dev_file); fd_index = fd_table.add_file(ofd1); auto fd1 = fd_table.get_file(fd_index); |
