blob: 08f0b25cd00f106f820480da778c1131101bb6dd (
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/dentry.hpp"
#include "kapi/system.hpp"
#include "kernel/filesystem/inode.hpp"
#include <kstd/memory>
namespace filesystem
{
dentry::dentry(kstd::shared_ptr<dentry> const & parent, kstd::shared_ptr<inode> const & node)
: m_parent(parent)
, m_inode(node)
{
if (!m_inode)
{
kapi::system::panic("[FILESYSTEM] dentry constructed with null inode.");
}
}
auto dentry::get_inode() const -> kstd::shared_ptr<inode> const &
{
return m_inode;
}
auto dentry::get_parent() const -> kstd::shared_ptr<dentry> const &
{
return m_parent;
}
} // namespace filesystem
|