Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/vfs.h

    r51774cd r11baebb  
    4141
    4242#define FS_NAME_MAXLEN  20
    43 #define MAX_PATH_LEN    (32 * 1024)
     43#define MAX_PATH_LEN    (64 * 1024)
    4444#define MAX_MNTOPTS_LEN 256
    4545#define PLB_SIZE        (2 * MAX_PATH_LEN)
     
    6363
    6464typedef enum {
    65         VFS_IN_CLONE = IPC_FIRST_USER_METHOD,
     65        VFS_IN_OPEN = IPC_FIRST_USER_METHOD,
     66        VFS_IN_READ,
     67        VFS_IN_WRITE,
     68        VFS_IN_SEEK,
     69        VFS_IN_TRUNCATE,
     70        VFS_IN_FSTAT,
     71        VFS_IN_CLOSE,
     72        VFS_IN_PING,
    6673        VFS_IN_MOUNT,
    67         VFS_IN_OPEN,
    68         VFS_IN_PUT,
    69         VFS_IN_READ,
     74        VFS_IN_UNMOUNT,
     75        VFS_IN_SYNC,
    7076        VFS_IN_REGISTER,
     77        VFS_IN_MKDIR,
     78        VFS_IN_UNLINK,
    7179        VFS_IN_RENAME,
    72         VFS_IN_RESIZE,
    7380        VFS_IN_STAT,
    74         VFS_IN_STATFS,
    75         VFS_IN_SYNC,
    76         VFS_IN_UNLINK,
    77         VFS_IN_UNMOUNT,
     81        VFS_IN_DUP,
    7882        VFS_IN_WAIT_HANDLE,
    79         VFS_IN_WALK,
    80         VFS_IN_WRITE,
     83        VFS_IN_MTAB_GET,
     84        VFS_IN_STATFS
    8185} vfs_in_request_t;
    8286
    8387typedef enum {
    84         VFS_OUT_CLOSE = IPC_FIRST_USER_METHOD,
     88        VFS_OUT_OPEN_NODE = IPC_FIRST_USER_METHOD,
     89        VFS_OUT_READ,
     90        VFS_OUT_WRITE,
     91        VFS_OUT_TRUNCATE,
     92        VFS_OUT_CLOSE,
     93        VFS_OUT_MOUNT,
     94        VFS_OUT_MOUNTED,
     95        VFS_OUT_UNMOUNT,
     96        VFS_OUT_UNMOUNTED,
     97        VFS_OUT_SYNC,
     98        VFS_OUT_STAT,
     99        VFS_OUT_LOOKUP,
    85100        VFS_OUT_DESTROY,
    86         VFS_OUT_IS_EMPTY,
    87         VFS_OUT_LINK,
    88         VFS_OUT_LOOKUP,
    89         VFS_OUT_MOUNTED,
    90         VFS_OUT_OPEN_NODE,
    91         VFS_OUT_READ,
    92         VFS_OUT_STAT,
    93101        VFS_OUT_STATFS,
    94         VFS_OUT_SYNC,
    95         VFS_OUT_TRUNCATE,
    96         VFS_OUT_UNMOUNTED,
    97         VFS_OUT_WRITE,
    98102        VFS_OUT_LAST
    99103} vfs_out_request_t;
     
    123127
    124128/**
    125  * Lookup will not cross any mount points.
    126  * If the lookup would have to cross a mount point, it returns EXDEV instead.
     129 * Lookup will succeed only if the object is a root directory. The flag is
     130 * mutually exclusive with L_FILE and L_MP.
    127131 */
    128 #define L_DISABLE_MOUNTS        4
     132#define L_ROOT                  4
    129133
    130134/**
    131135 * Lookup will succeed only if the object is a mount point. The flag is mutually
    132  * exclusive with L_FILE.
     136 * exclusive with L_FILE and L_ROOT.
    133137 */
    134138#define L_MP                    8
     
    147151
    148152/**
     153 * L_LINK is used for linking to an already existing nodes.
     154 */
     155#define L_LINK                  64
     156
     157/**
    149158 * L_UNLINK is used to remove leaves from the file system namespace. This flag
    150159 * cannot be passed directly by the client, but will be set by VFS during
    151160 * VFS_UNLINK.
    152161 */
    153 #define L_UNLINK                64
     162#define L_UNLINK                128
    154163
    155 /*
    156  * Walk flags.
     164/**
     165 * L_OPEN is used to indicate that the lookup operation is a part of VFS_IN_OPEN
     166 * call from the client. This means that the server might allocate some
     167 * resources for the opened file. This flag cannot be passed directly by the
     168 * client.
    157169 */
    158 enum {
    159         WALK_MAY_CREATE = (1 << 0),
    160         WALK_MUST_CREATE = (1 << 1),
    161        
    162         WALK_REGULAR = (1 << 2),
    163         WALK_DIRECTORY = (1 << 3),
    164         WALK_MOUNT_POINT = (1 << 4),
    165        
    166         WALK_ALL_FLAGS = WALK_MAY_CREATE | WALK_MUST_CREATE | WALK_REGULAR |
    167             WALK_DIRECTORY | WALK_MOUNT_POINT,
    168 };
    169 
    170 enum {
    171         VFS_MOUNT_BLOCKING = 1,
    172         VFS_MOUNT_CONNECT_ONLY = 2,
    173         VFS_MOUNT_NO_REF = 4,
    174 };
    175 
    176 enum {
    177         MODE_READ = 1,
    178         MODE_WRITE = 2,
    179         MODE_APPEND = 4,
    180 };
     170#define L_OPEN                  256
    181171
    182172#endif
Note: See TracChangeset for help on using the changeset viewer.