path.c File Reference

#include "libc.h"

Defines

#define PROCINET   "/proc/inet"

Functions

char ** path_split (char *path, char sep)
int path_simplify (char *path)
int userland_path_gate (char *npath, int *gate_returned)
char * path_treat (char *path, u_int32_t opts, char *wd, t_path_gate_fn path_gate, int *gate_returned, char *s)

Define Documentation

#define PROCINET   "/proc/inet"
 


Function Documentation

int path_simplify char *  path  ) 
 

simplifies path - removes /./ or // returns 0 if OK else -1 and fills errno

char** path_split char *  path,
char  sep
 

splits a path in pieces e.g: "//foo//bar" becomes {"", "", "foo", "", "bar", NULL} returns NULL if a memory problem was encountered

char* path_treat char *  path,
u_int32_t  opts,
char *  wd,
t_path_gate_fn  path_gate,
int *  gate_returned,
char *  s
 

treat a path before any operations on it - should be called before any path lookup: (see options).

If OK returns newly allocated pointer, else returns NULL and errno filled.

Parameters:
path  input path
opts  options
wd  work directory
path_gate  or NULL (should set errno)
s  comment for debug

int userland_path_gate char *  npath,
int *  gate_returned
 


Generated on Wed May 24 23:05:54 2006 for LSE/OS by  doxygen 1.4.6