aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/main.cpp
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-21 16:22:23 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-26 21:17:37 +0100
commit6c172389b562a08a6540574d6fbdf6a5bdce37b8 (patch)
tree117a54580d50a7702f88ea7ff30c9b9c8317b978 /kernel/src/main.cpp
parentffb2accb09a013d8da16acd824c846bc1acfd8e4 (diff)
downloadteachos-6c172389b562a08a6540574d6fbdf6a5bdce37b8.tar.xz
teachos-6c172389b562a08a6540574d6fbdf6a5bdce37b8.zip
simplify architecture again
Diffstat (limited to 'kernel/src/main.cpp')
-rw-r--r--kernel/src/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp
index 8d7308b..eb699bd 100644
--- a/kernel/src/main.cpp
+++ b/kernel/src/main.cpp
@@ -4,7 +4,6 @@
#include "kapi/system.hpp"
#include "kernel/devices/storage/storage_management.hpp"
-#include "kernel/filesystem/device_file.hpp"
#include "kernel/filesystem/device_inode.hpp"
#include "kernel/filesystem/file_descriptor_table.hpp"
#include "kernel/filesystem/open_file_description.hpp"
@@ -28,8 +27,7 @@ auto test_file_description_manually() -> void
auto dev_node = kstd::make_shared<filesystem::device_inode>(device);
- auto dev_file = kstd::make_shared<filesystem::device_file>(dev_node);
- auto ofd = kstd::make_shared<filesystem::open_file_description>(dev_file);
+ auto ofd = kstd::make_shared<filesystem::open_file_description>(dev_node);
auto fd_index = fd_table.add_file(ofd);
// use: read two bytes and write two again
@@ -64,7 +62,7 @@ auto test_file_description_manually() -> void
fd_table.remove_file(fd_index);
// use: read four bytes again -> two old bytes two new bytes
- auto ofd1 = kstd::make_shared<filesystem::open_file_description>(dev_file);
+ auto ofd1 = kstd::make_shared<filesystem::open_file_description>(dev_node);
fd_index = fd_table.add_file(ofd1);
auto fd1 = fd_table.get_file(fd_index);
@@ -91,6 +89,9 @@ auto test_file_description_manually() -> void
auto test_device_with_vfs() -> void
{
// TODO BA-FS26
+
+ auto vfs = filesystem::vfs::get();
+ vfs.open("/");
}
auto run_test_code() -> void