Changes in uspace/srv/vfs/vfs.h [ffa2c8ef:852b801] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.h

    rffa2c8ef r852b801  
    3434#define VFS_VFS_H_
    3535
    36 #include <async.h>
     36#include <ipc/ipc.h>
    3737#include <adt/list.h>
    38 #include <fibril_synch.h>
     38#include <fibril_sync.h>
    3939#include <sys/types.h>
    4040#include <devmap.h>
     
    4242#include <ipc/vfs.h>
    4343
    44 #ifndef dprintf
    45         #define dprintf(...)
    46 #endif
     44// FIXME: according to CONFIG_DEBUG
     45// #define dprintf(...)  printf(__VA_ARGS__)
     46
     47#define dprintf(...)
    4748
    4849/**
     
    5354        vfs_info_t vfs_info;
    5455        fs_handle_t fs_handle;
    55         async_sess_t session;
     56        fibril_mutex_t phone_lock;
     57        ipcarg_t phone;
    5658} fs_info_t;
    5759
     
    6163#define VFS_PAIR \
    6264        fs_handle_t fs_handle; \
    63         devmap_handle_t devmap_handle;
     65        dev_handle_t dev_handle;
    6466
    6567/**
     
    6769 * doesn't contain any state. For a stateful structure, see vfs_node_t.
    6870 *
    69  * @note        fs_handle, devmap_handle and index are meant to be returned in one
     71 * @note        fs_handle, dev_handle and index are meant to be returned in one
    7072 *              IPC reply.
    7173 */
     
    9193        vfs_triplet_t triplet;
    9294        vfs_node_type_t type;
    93         aoff64_t size;
    94         unsigned int lnkcnt;
     95        size_t size;
     96        unsigned lnkcnt;
    9597} vfs_lookup_res_t;
    9698
     
    115117        vfs_node_type_t type;   /**< Partial info about the node type. */
    116118
    117         aoff64_t size;          /**< Cached size if the node is a file. */
     119        size_t size;            /**< Cached size if the node is a file. */
    118120
    119121        /**
     
    139141        bool append;
    140142
    141         /** Current absolute position in the file. */
    142         aoff64_t pos;
     143        /** Current position in the file. */
     144        off_t pos;
    143145} vfs_file_t;
    144146
     
    168170
    169171extern int vfs_grab_phone(fs_handle_t);
    170 extern void vfs_release_phone(fs_handle_t, int);
     172extern void vfs_release_phone(int);
    171173
    172174extern fs_handle_t fs_name_to_handle(char *, bool);
    173 extern vfs_info_t *fs_handle_to_info(fs_handle_t);
    174175
    175176extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *,
    176177    vfs_pair_t *, ...);
    177178extern int vfs_open_node_internal(vfs_lookup_res_t *);
    178 extern int vfs_close_internal(vfs_file_t *);
    179179
    180180extern bool vfs_nodes_init(void);
    181181extern vfs_node_t *vfs_node_get(vfs_lookup_res_t *);
    182182extern void vfs_node_put(vfs_node_t *);
    183 extern void vfs_node_forget(vfs_node_t *);
    184 extern unsigned vfs_nodes_refcount_sum_get(fs_handle_t, devmap_handle_t);
    185 
    186183
    187184#define MAX_OPEN_FILES  128
    188185
    189 extern void *vfs_client_data_create(void);
    190 extern void vfs_client_data_destroy(void *);
    191 
     186extern bool vfs_files_init(void);
    192187extern vfs_file_t *vfs_file_get(int);
    193 extern void vfs_file_put(vfs_file_t *);
    194 extern int vfs_fd_assign(vfs_file_t *, int);
    195 extern int vfs_fd_alloc(bool desc);
     188extern int vfs_fd_alloc(void);
    196189extern int vfs_fd_free(int);
     190
     191extern void vfs_file_addref(vfs_file_t *);
     192extern void vfs_file_delref(vfs_file_t *);
    197193
    198194extern void vfs_node_addref(vfs_node_t *);
     
    201197extern void vfs_register(ipc_callid_t, ipc_call_t *);
    202198extern void vfs_mount(ipc_callid_t, ipc_call_t *);
    203 extern void vfs_unmount(ipc_callid_t, ipc_call_t *);
    204199extern void vfs_open(ipc_callid_t, ipc_call_t *);
    205200extern void vfs_open_node(ipc_callid_t, ipc_call_t *);
    206201extern void vfs_sync(ipc_callid_t, ipc_call_t *);
    207 extern void vfs_dup(ipc_callid_t, ipc_call_t *);
    208202extern void vfs_close(ipc_callid_t, ipc_call_t *);
    209203extern void vfs_read(ipc_callid_t, ipc_call_t *);
     
    212206extern void vfs_truncate(ipc_callid_t, ipc_call_t *);
    213207extern void vfs_fstat(ipc_callid_t, ipc_call_t *);
     208extern void vfs_fstat(ipc_callid_t, ipc_call_t *);
    214209extern void vfs_stat(ipc_callid_t, ipc_call_t *);
    215210extern void vfs_mkdir(ipc_callid_t, ipc_call_t *);
Note: See TracChangeset for help on using the changeset viewer.