blob: a4dd12c96fb77c661e0f751b81e7971e2e6c916c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
|