aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/custody.cpp
diff options
context:
space:
mode:
authorLukas Oesch <lukas.oesch@ost.ch>2026-03-17 19:48:59 +0100
committerLukas Oesch <lukas.oesch@ost.ch>2026-03-17 19:48:59 +0100
commite4291ea7c01cad04a02ca3f577dba9ccbadad110 (patch)
tree4af08f01820bf13fba8dda7646d036bcbdd3df53 /kernel/src/filesystem/custody.cpp
parent59504cfd677dd3e9d9ddb0deea4df7614efedb84 (diff)
parentfde097681f96e2c6f23ecd71a5c0037acb3ac79e (diff)
downloadteachos-e4291ea7c01cad04a02ca3f577dba9ccbadad110.tar.xz
teachos-e4291ea7c01cad04a02ca3f577dba9ccbadad110.zip
Merge branch 'tidy-up-folder-structure' into 'develop-BA-FS26'
rename files to snake_case (temp_device part1 -> renamed to device later, due... See merge request teachos/kernel!12
Diffstat (limited to 'kernel/src/filesystem/custody.cpp')
-rw-r--r--kernel/src/filesystem/custody.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/src/filesystem/custody.cpp b/kernel/src/filesystem/custody.cpp
new file mode 100644
index 0000000..a4dd12c
--- /dev/null
+++ b/kernel/src/filesystem/custody.cpp
@@ -0,0 +1,30 @@
+#include "kernel/filesystem/custody.hpp"
+
+#include "kapi/system.hpp"
+
+#include "kernel/filesystem/inode.hpp"
+
+#include <kstd/memory>
+
+namespace filesystem
+{
+ custody::custody(kstd::shared_ptr<custody> const & parent, kstd::shared_ptr<inode> const & node)
+ : m_parent(parent)
+ , m_inode(node)
+ {
+ if (!m_inode)
+ {
+ kapi::system::panic("[FILESYSTEM] custody constructed with null inode.");
+ }
+ }
+
+ auto custody::get_inode() const -> kstd::shared_ptr<inode> const &
+ {
+ return m_inode;
+ }
+
+ auto custody::get_parent() const -> kstd::shared_ptr<custody> const &
+ {
+ return m_parent;
+ }
+} // namespace filesystem \ No newline at end of file