00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00035 #ifndef LIBC_IPC_VFS_H_
00036 #define LIBC_IPC_VFS_H_
00037
00038 #include <ipc/common.h>
00039 #include <sys/types.h>
00040 #include <bool.h>
00041
00042 #define FS_NAME_MAXLEN 20
00043 #define MAX_PATH_LEN (64 * 1024)
00044 #define PLB_SIZE (2 * MAX_PATH_LEN)
00045
00046
00047 typedef int16_t fs_handle_t;
00048 typedef uint32_t fs_index_t;
00049
00055 typedef struct {
00057 char name[FS_NAME_MAXLEN + 1];
00058 bool concurrent_read_write;
00059 bool write_retains_size;
00060 } vfs_info_t;
00061
00062 typedef enum {
00063 VFS_IN_OPEN = IPC_FIRST_USER_METHOD,
00064 VFS_IN_OPEN_NODE,
00065 VFS_IN_READ,
00066 VFS_IN_WRITE,
00067 VFS_IN_SEEK,
00068 VFS_IN_TRUNCATE,
00069 VFS_IN_FSTAT,
00070 VFS_IN_CLOSE,
00071 VFS_IN_MOUNT,
00072 VFS_IN_UNMOUNT,
00073 VFS_IN_SYNC,
00074 VFS_IN_REGISTER,
00075 VFS_IN_MKDIR,
00076 VFS_IN_UNLINK,
00077 VFS_IN_RENAME,
00078 VFS_IN_STAT,
00079 VFS_IN_DUP
00080 } vfs_in_request_t;
00081
00082 typedef enum {
00083 VFS_OUT_OPEN_NODE = IPC_FIRST_USER_METHOD,
00084 VFS_OUT_READ,
00085 VFS_OUT_WRITE,
00086 VFS_OUT_TRUNCATE,
00087 VFS_OUT_CLOSE,
00088 VFS_OUT_MOUNT,
00089 VFS_OUT_MOUNTED,
00090 VFS_OUT_UNMOUNT,
00091 VFS_OUT_UNMOUNTED,
00092 VFS_OUT_SYNC,
00093 VFS_OUT_STAT,
00094 VFS_OUT_LOOKUP,
00095 VFS_OUT_DESTROY,
00096 VFS_OUT_LAST
00097 } vfs_out_request_t;
00098
00099
00100
00101
00102
00106 #define L_NONE 0
00107
00113 #define L_FILE 1
00114
00120 #define L_DIRECTORY 2
00121
00126 #define L_ROOT 4
00127
00132 #define L_MP 8
00133
00134
00139 #define L_EXCLUSIVE 16
00140
00144 #define L_CREATE 32
00145
00149 #define L_LINK 64
00150
00156 #define L_UNLINK 128
00157
00164 #define L_OPEN 256
00165
00166 #endif
00167