Subversion Repositories HelenOS

Rev

Rev 3674 | Rev 4345 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3674 Rev 4341
Line 45... Line 45...
45
 
45
 
46
#define dprintf(...)
46
#define dprintf(...)
47
 
47
 
48
#define VFS_FIRST   IPC_FIRST_USER_METHOD
48
#define VFS_FIRST   IPC_FIRST_USER_METHOD
49
 
49
 
50
#define IPC_METHOD_TO_VFS_OP(m) ((m) - VFS_FIRST)   
-
 
51
 
-
 
52
/* Basic types. */
50
/* Basic types. */
53
typedef int16_t fs_handle_t;
51
typedef int16_t fs_handle_t;
54
typedef int16_t dev_handle_t;
52
typedef int16_t dev_handle_t;
55
typedef uint32_t fs_index_t;
53
typedef uint32_t fs_index_t;
56
 
54
 
Line 79... Line 77...
79
    VFS_UNLINK,
77
    VFS_UNLINK,
80
    VFS_RENAME,
78
    VFS_RENAME,
81
    VFS_LAST_SRV,   /* keep this the last member of this enum */
79
    VFS_LAST_SRV,   /* keep this the last member of this enum */
82
} vfs_request_srv_t;
80
} vfs_request_srv_t;
83
 
81
 
84
 
-
 
85
/**
-
 
86
 * An instance of this structure is associated with a particular FS operation.
-
 
87
 * It tells VFS if the FS supports the operation or maybe if a default one
-
 
88
 * should be used.
-
 
89
 */
-
 
90
typedef enum {
-
 
91
    VFS_OP_NULL = 0,
-
 
92
    VFS_OP_DEFAULT,
-
 
93
    VFS_OP_DEFINED
-
 
94
} vfs_op_t;
-
 
95
 
-
 
96
#define FS_NAME_MAXLEN  20
82
#define FS_NAME_MAXLEN  20
97
 
83
 
98
/**
84
/**
99
 * A structure like this is passed to VFS by each individual FS upon its
85
 * A structure like this is passed to VFS by each individual FS upon its
100
 * registration. It assosiates a human-readable identifier with each
86
 * registration. It assosiates a human-readable identifier with each
101
 * registered FS. More importantly, through this structure, the FS announces
-
 
102
 * what operations it supports.
87
 * registered FS.
103
 */
88
 */
104
typedef struct {
89
typedef struct {
105
    /** Unique identifier of the fs. */
90
    /** Unique identifier of the fs. */
106
    char name[FS_NAME_MAXLEN + 1];
91
    char name[FS_NAME_MAXLEN + 1];
107
   
-
 
108
    /** Operations. */
-
 
109
    vfs_op_t ops[VFS_LAST_CLNT - VFS_FIRST];
-
 
110
} vfs_info_t;
92
} vfs_info_t;
111
 
93
 
112
/**
94
/**
113
 * A structure like this will be allocated for each registered file system.
95
 * A structure like this will be allocated for each registered file system.
114
 */
96
 */