aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/main.cpp
diff options
context:
space:
mode:
authorMarcel Braun <marcel.braun@ost.ch>2026-04-16 22:04:32 +0200
committerMarcel Braun <marcel.braun@ost.ch>2026-04-16 22:04:32 +0200
commitf642efb5cf199d3bbb8e3b01c451c71a1fbeabf8 (patch)
tree7e680dd885a59678d7075d352ee623f659d64d48 /kernel/src/main.cpp
parent3c210c07c60fbe9378cfb720847e8c1d3c763ead (diff)
parente70ea2357a80386b0a12138201b353d942910296 (diff)
downloadteachos-f642efb5cf199d3bbb8e3b01c451c71a1fbeabf8.tar.xz
teachos-f642efb5cf199d3bbb8e3b01c451c71a1fbeabf8.zip
Merge branch 'syscall-interface' into 'develop-BA-FS26'
Add fs syscall handler See merge request teachos/kernel!23
Diffstat (limited to 'kernel/src/main.cpp')
-rw-r--r--kernel/src/main.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/kernel/src/main.cpp b/kernel/src/main.cpp
index 79ed703..e296bd5 100644
--- a/kernel/src/main.cpp
+++ b/kernel/src/main.cpp
@@ -9,7 +9,6 @@
#include "kernel/devices/storage/management.hpp"
#include "kernel/filesystem/device_inode.hpp"
#include "kernel/filesystem/file_descriptor_table.hpp"
-#include "kernel/filesystem/filesystem.hpp"
#include "kernel/filesystem/open_file_description.hpp"
#include "kernel/filesystem/vfs.hpp"
#include "kernel/memory.hpp"
@@ -138,24 +137,17 @@ auto test_file_lookup() -> void
"this_is_a_very_very_long_fish_filename_that_keeps_going_and_going_until_it_almost_breaks_linux_filesystem_"
"limits_for_testing_purposes_and_we_add_more_characters_to_make_it_even_longer_30.txt");
- auto storage_mgmt = kernel::devices::storage::management::get();
- auto device_1 = storage_mgmt.device_by_major_minor(1, 16);
- auto fs_1 = kernel::filesystem::filesystem::probe_and_mount(device_1);
-
- vfs.do_mount("/enclosures/aquarium", fs_1);
+ vfs.do_mount("/dev/ram16", "/enclosures/aquarium");
read_and_write_file("/enclosures/aquarium/closed.txt");
read_and_write_file("/enclosures/aquarium/information/info_2.txt");
vfs.unmount("/enclosures/aquarium");
read_and_write_file("/enclosures/aquarium/tank_1/fish_4.txt");
- auto device_2 = storage_mgmt.device_by_major_minor(1, 32);
- auto fs_2 = kernel::filesystem::filesystem::probe_and_mount(device_2);
-
- vfs.do_mount("/enclosures/elephant_house", fs_2);
+ vfs.do_mount("/dev/ram32", "/enclosures/elephant_house");
read_and_write_file("/enclosures/elephant_house/monkey_house/infrastructure/info.txt");
- vfs.do_mount("/enclosures/elephant_house/monkey_house", fs_1);
+ vfs.do_mount("/dev/ram16", "/enclosures/elephant_house/monkey_house");
read_and_write_file("/enclosures/elephant_house/monkey_house/information/info_2.txt");
auto result = vfs.unmount("/enclosures/elephant_house");