|
PatchworkOS
|
#include <kernel/fs/path.h>#include <kernel/fs/dentry.h>#include <kernel/fs/namespace.h>#include <kernel/fs/vfs.h>#include <kernel/log/log.h>#include <kernel/log/panic.h>#include <kernel/sync/mutex.h>#include <errno.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | path_flag_entry_t |
Functions | |
| static path_flag_entry_t * | path_flags_get (const char *flag, uint64_t length) |
| void | path_flags_init (void) |
| Initialize path flags resolution. | |
| uint64_t | pathname_init (pathname_t *pathname, const char *string) |
| Initialize a pathname. | |
| void | path_set (path_t *path, mount_t *mount, dentry_t *dentry) |
| Set a path. | |
| void | path_copy (path_t *dest, const path_t *src) |
| Copy a path. | |
| void | path_put (path_t *path) |
| Put a path. | |
| static uint64_t | path_handle_dotdot (path_t *current) |
| uint64_t | path_walk_single_step (path_t *outPath, const path_t *parent, const char *component, walk_flags_t flags, namespace_t *ns) |
| Traverse a single component from a parent path. | |
| uint64_t | path_walk (path_t *outPath, const pathname_t *pathname, const path_t *start, walk_flags_t flags, namespace_t *ns) |
| Traverse a pathname from a specified starting path. | |
| uint64_t | path_walk_parent (path_t *outPath, const pathname_t *pathname, const path_t *start, char *outLastName, walk_flags_t flags, namespace_t *ns) |
| Traverse a pathname to its parent and get the last component name. | |
| uint64_t | path_to_name (const path_t *path, pathname_t *pathname) |
| Convert a path to a pathname. | |
Variables | |
| static map_t | flagMap |
| static map_t | flagShortMap |
| static path_flag_entry_t | flagEntries [] |
|
static |
Definition at line 34 of file path.c.
References assert, CONTAINER_OF_SAFE, EBADFLAG, errno, flagEntries, flagMap, flagShortMap, map_get(), map_key_buffer(), NULL, and PATH_FLAGS_AMOUNT.
Referenced by pathname_init().
Definition at line 272 of file path.c.
References assert, path_t::dentry, DEREF, ELOOP, ENOENT, ERR, errno, path_t::mount, mount_t::mountpoint, NULL, dentry_t::parent, mount_t::parent, PATH_HANDLE_DOTDOT_MAX_ITER, REF, and mount_t::root.
Referenced by path_walk().
|
static |
Definition at line 24 of file path.c.
Referenced by path_flags_get(), and path_flags_init().
|
static |
Definition at line 13 of file path.c.
Referenced by path_flags_get(), and path_flags_init().
|
static |
Definition at line 14 of file path.c.
Referenced by path_flags_get(), and path_flags_init().