diff options
| author | Marcel Braun <marcel.braun@ost.ch> | 2026-04-13 18:49:21 +0200 |
|---|---|---|
| committer | Marcel Braun <marcel.braun@ost.ch> | 2026-04-13 18:49:21 +0200 |
| commit | eb36544624c18a284debdf78b43fe627f40a8371 (patch) | |
| tree | 8756d0de83c7dde49ba70d4051681a8efb6fd39a /kernel/kapi | |
| parent | bb01b9f2d29524974881e9a88ffb6c229836ddba (diff) | |
| download | teachos-eb36544624c18a284debdf78b43fe627f40a8371.tar.xz teachos-eb36544624c18a284debdf78b43fe627f40a8371.zip | |
Rename and refactor
Diffstat (limited to 'kernel/kapi')
| -rw-r--r-- | kernel/kapi/filesystem.cpp (renamed from kernel/kapi/syscall_handler/filesystem.cpp) | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/kapi/syscall_handler/filesystem.cpp b/kernel/kapi/filesystem.cpp index a6e8027..a734ac0 100644 --- a/kernel/kapi/syscall_handler/filesystem.cpp +++ b/kernel/kapi/filesystem.cpp @@ -1,19 +1,20 @@ -#include "kapi/syscall_handler/filesystem.hpp" +#include "kapi/filesystem.hpp" #include "kernel/filesystem/file_descriptor_table.hpp" #include "kernel/filesystem/vfs.hpp" #include <cstddef> +#include <string_view> #include <sys/types.h> -namespace kapi::syscall_handler::filesystem +namespace kapi::filesystem { - auto mount(char const * source, char const * target) -> int + auto mount(std::string_view source, std::string_view target) -> int { // TODO BA-FS26 } - auto umount(char const * target) -> int + auto umount(std::string_view target) -> int { if (kernel::filesystem::vfs::get().unmount(target) == kernel::filesystem::vfs::operation_result::success) { @@ -22,7 +23,7 @@ namespace kapi::syscall_handler::filesystem return -1; } - auto open(char const * path) -> int + auto open(std::string_view path) -> int { if (auto open_file_description = kernel::filesystem::vfs::get().open(path)) { @@ -56,4 +57,4 @@ namespace kapi::syscall_handler::filesystem return -1; } -} // namespace kapi::syscall_handler::filesystem
\ No newline at end of file +} // namespace kapi::filesystem
\ No newline at end of file |
