65#define DENTRY_IS_ROOT(dentry) ((dentry)->parent == (dentry))
71typedef struct dentry_ops
#define MAX_NAME
Maximum length of names.
void dentry_make_positive(dentry_t *dentry, inode_t *inode)
Make a dentry positive by associating it with an inode.
dentry_t * dentry_new(superblock_t *superblock, dentry_t *parent, const char *name)
Create a new dentry.
uint64_t dentry_id_t
Dentry ID type.
dentry_t * dentry_lookup(const path_t *parent, const char *name)
Lookup a dentry for the given name. Will NOT traverse mountpoints.
bool dentry_is_positive(dentry_t *dentry)
Check if a dentry is positive.
uint64_t dentry_generic_getdents(dentry_t *dentry, dirent_t *buffer, uint64_t count, uint64_t *offset, mode_t mode)
Helper function for a basic getdents.
bool dentry_is_dir(dentry_t *dentry)
Check if the inode associated with a dentry is a directory.
dentry_t * dentry_get(const dentry_t *parent, const char *name)
Get a dentry for the given name. Will NOT traverse mountpoints.
dentry_flags_t
Dentry flags.
bool dentry_is_file(dentry_t *dentry)
Check if the inode associated with a dentry is a file.
@ DENTRY_NEGATIVE
Dentry is negative (no associated inode).
mode_t
Path flags and permissions.
uint64_t getdents(fd_t fd, dirent_t *buffer, uint64_t count)
System call for reading directory entires.
EFI_PHYSICAL_ADDRESS buffer
static const path_flag_t flags[]
Dentry operations structure.
Directory entry structure.
inode_t * inode
Will be NULL if the dentry is negative, once positive it will never be NULL.
_Atomic(uint64_t) mountCount
Number of mounts targeting this dentry.
list_entry_t otherEntry
Made available for use by any other subsystems for convenience.
superblock_t * superblock
list_entry_t siblingEntry
_Atomic(dentry_flags_t) flags
A entry in a doubly linked list.
Reference counting structure.