aboutsummaryrefslogtreecommitdiff
path: root/kernel/filesystem/src
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-15 18:49:34 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-17 16:43:12 +0100
commitf52f4eb4aff3f8346c9ba73bcc57db4ca6fc6cb2 (patch)
treea80f6311268f1388037c54dd47f1522f85c68424 /kernel/filesystem/src
parente355d5e6aa84b1ea4de70820159b5f1af13bc6f8 (diff)
downloadteachos-f52f4eb4aff3f8346c9ba73bcc57db4ca6fc6cb2.tar.xz
teachos-f52f4eb4aff3f8346c9ba73bcc57db4ca6fc6cb2.zip
implement first draft of custody
Diffstat (limited to 'kernel/filesystem/src')
-rw-r--r--kernel/filesystem/src/custody.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/kernel/filesystem/src/custody.cpp b/kernel/filesystem/src/custody.cpp
new file mode 100644
index 0000000..614e63b
--- /dev/null
+++ b/kernel/filesystem/src/custody.cpp
@@ -0,0 +1,28 @@
+#include "filesystem/custody.hpp"
+
+#include "kapi/system.hpp"
+
+#include "filesystem/inode.hpp"
+
+namespace filesystem
+{
+ custody::custody(custody * parent, inode * node)
+ : m_parent(parent)
+ , m_inode(node)
+ {
+ if (!m_inode)
+ {
+ kapi::system::panic("[FILESYSTEM] custody constructed with null inode.");
+ }
+ }
+
+ auto custody::get_inode() const -> inode *
+ {
+ return m_inode;
+ }
+
+ auto custody::get_parent() const -> custody *
+ {
+ return m_parent;
+ }
+} // namespace filesystem \ No newline at end of file