Merged fs0 to mm0 for simpler progress on posix api.

mm0 and all other posix dependents are building ok.
This commit is contained in:
Bahadir Balban
2009-10-04 17:34:19 +03:00
parent ed9199a972
commit f8bcd7a546
88 changed files with 593 additions and 2638 deletions

View File

@@ -0,0 +1,41 @@
/*
* Copyright (C) 2008 Bahadir Balban
*
* Path lookup related information
*/
#ifndef __PATH_H__
#define __PATH_H__
#include <l4/lib/list.h>
#include <task.h>
/*
* FIXME:
* These ought to be strings and split/comparison functions should
* always use strings because formats like UTF-8 wouldn't work.
*/
#define VFS_CHAR_SEP '/'
#define VFS_STR_ROOTDIR "/"
#define VFS_STR_PARDIR ".."
#define VFS_STR_CURDIR "."
#define VFS_STR_XATDIR "...."
struct pathdata {
struct link list;
struct vnode *vstart;
};
struct pathcomp {
struct link list;
const char *str;
};
struct pathdata *pathdata_parse(const char *pathname, char *pathbuf,
struct tcb *task);
void pathdata_destroy(struct pathdata *p);
/* Destructive, i.e. unlinks those components from list */
const char *pathdata_next_component(struct pathdata *pdata);
const char *pathdata_last_component(struct pathdata *pdata);
#endif /* __PATH_H__ */