53#define PATH_DEFER(path) __attribute__((cleanup(path_defer_cleanup))) path_t* CONCAT(i, __COUNTER__) = (path) 
   66#define PATH_VALID_CHAR(ch) \ 
   67    (strchr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-. ()[]{}~!@#$%^&?',;=+", (ch))) 
 
   74#define PATH_HANDLE_DOTDOT_MAX_ITER 1000 
  121typedef struct pathname
 
 
  143#define PATHNAME_IS_VALID(pathname) ((pathname) != NULL && (pathname)->isValid) 
  156#define PATHNAME(string) \ 
  158        pathname_t* pathname = alloca(sizeof(pathname_t)); \ 
  159        pathname_init(pathname, string); \ 
 
  185        .mount = NULL, .dentry = NULL \ 
 
  195#define PATH_CREATE(inMount, inDentry) \ 
  198        .mount = REF(inMount), .dentry = REF(inDentry), \ 
 
#define MAX_PATH
Maximum length of filepaths.
static void path_defer_cleanup(path_t **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.
void path_put(path_t *path)
Put a path.
#define PATH_CREATE(inMount, inDentry)
Helper to create a 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_single_step(path_t *outPath, const path_t *parent, const char *name, walk_flags_t flags, namespace_t *ns)
Traverse a single component from a parent path.
walk_flags_t
Flags for walking a path.
void path_set(path_t *path, mount_t *mount, dentry_t *dentry)
Set a path.
void path_flags_init(void)
Initialize path flags resolution.
uint64_t pathname_init(pathname_t *pathname, const char *string)
Initialize a pathname.
void path_copy(path_t *dest, const path_t *src)
Copy a path.
uint64_t path_to_name(const path_t *path, pathname_t *pathname)
Convert a path to a pathname.
@ WALK_NEGATIVE_IS_OK
If a negative dentry is ok, if not specified then it is considered an error.
#define NULL
Pointer error value.
Directory entry structure.