MOS Source Code
|
#include "mos/filesystem/dentry.h"
#include "mos/assert.h"
#include "mos/filesystem/inode.h"
#include "mos/filesystem/mount.h"
#include "mos/filesystem/vfs.h"
#include "mos/filesystem/vfs_types.h"
#include "mos/filesystem/vfs_utils.h"
#include "mos/io/io.h"
#include "mos/lib/sync/spinlock.h"
#include "mos/syslog/printk.h"
#include "mos/tasks/process.h"
#include "mos/tasks/task_types.h"
#include <mos/filesystem/fs_types.h>
#include <mos/lib/structures/hashmap_common.h>
#include <mos_stdio.h>
#include <mos_stdlib.h>
#include <mos_string.h>
Go to the source code of this file.
Functions | |
static dentry_t * | dentry_resolve_lastseg (dentry_t *parent, char *leaf, lastseg_resolve_flags_t flags, bool *symlink_resolved) |
static dentry_t * | dentry_resolve_follow_symlink (dentry_t *dentry, lastseg_resolve_flags_t flags) |
static dentry_t * | dentry_resolve_to_parent (dentry_t *base_dir, dentry_t *root_dir, const char *original_path, char **last_seg_out) |
Lookup the parent directory of a given path, and return the last segment of the path in last_seg_out. | |
void | dentry_attach (dentry_t *d, inode_t *inode) |
Attach an inode to a dentry. | |
void | dentry_detach (dentry_t *d) |
Detach the inode from a dentry. | |
dentry_t * | dentry_from_fd (fd_t fd) |
Get the dentry from a file descriptor. | |
dentry_t * | dentry_lookup_child (dentry_t *parent, const char *name) |
Get a child dentry from a parent dentry. | |
dentry_t * | dentry_resolve (dentry_t *starting_dir, dentry_t *root_dir, const char *path, lastseg_resolve_flags_t flags) |
Lookup a path in the filesystem. | |
static void | dirter_add (vfs_listdir_state_t *state, u64 ino, const char *name, size_t name_len, file_type_t type) |
void | vfs_populate_listdir_buf (dentry_t *dir, vfs_listdir_state_t *state) |
List the contents of a directory. | |
|
static |
Definition at line 210 of file dentry.c.
Referenced by dentry_resolve(), and dentry_resolve_follow_symlink().
|
static |
Definition at line 166 of file dentry.c.
Referenced by dentry_resolve_lastseg(), and dentry_resolve_to_parent().
|
static |
Lookup the parent directory of a given path, and return the last segment of the path in last_seg_out.
base_dir | A directory to start the lookup from |
root_dir | The root directory of the filesystem, the lookup will not go above this directory |
original_path | The path to lookup |
last_seg_out | The last segment of the path will be returned in this parameter, the caller is responsible for freeing it |
Definition at line 47 of file dentry.c.
Referenced by dentry_resolve(), and dentry_resolve_follow_symlink().
|
static |
Definition at line 434 of file dentry.c.
Referenced by vfs_populate_listdir_buf().