OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [include/] [path.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Copyright (C) 2008 Bahadir Balban
3
 *
4
 * Path lookup related information
5
 */
6
#ifndef __PATH_H__
7
#define __PATH_H__
8
 
9
#include <l4/lib/list.h>
10
#include <task.h>
11
 
12
/*
13
 * FIXME:
14
 * These ought to be strings and split/comparison functions should
15
 * always use strings because formats like UTF-8 wouldn't work.
16
 */
17
#define VFS_CHAR_SEP            '/'
18
#define VFS_STR_ROOTDIR         "/"
19
#define VFS_STR_PARDIR          ".."
20
#define VFS_STR_CURDIR          "."
21
#define VFS_STR_XATDIR          "...."
22
 
23
struct pathdata {
24
        struct link list;
25
        struct vnode *vstart;
26
};
27
 
28
struct pathcomp {
29
        struct link list;
30
        const char *str;
31
};
32
 
33
struct pathdata *pathdata_parse(const char *pathname, char *pathbuf,
34
                                struct tcb *task);
35
void pathdata_destroy(struct pathdata *p);
36
 
37
/* Destructive, i.e. unlinks those components from list */
38
const char *pathdata_next_component(struct pathdata *pdata);
39
const char *pathdata_last_component(struct pathdata *pdata);
40
 
41
#endif /* __PATH_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.