1433d6423SLionel Sambuc /* Part of libhgfs - (c) 2009, D.C. van Moolenbroek */ 2433d6423SLionel Sambuc 3433d6423SLionel Sambuc /* attr.c */ 4433d6423SLionel Sambuc #define attr_get PREFIX(attr_get) 5433d6423SLionel Sambuc void attr_get(struct sffs_attr *attr); 6*94e65446SDavid van Moolenbroek int hgfs_getattr(const char *path, struct sffs_attr *attr); 7*94e65446SDavid van Moolenbroek int hgfs_setattr(const char *path, struct sffs_attr *attr); 8433d6423SLionel Sambuc 9433d6423SLionel Sambuc /* backdoor.s */ 10433d6423SLionel Sambuc #define backdoor PREFIX(backdoor) 11433d6423SLionel Sambuc #define backdoor_in PREFIX(backdoor_in) 12433d6423SLionel Sambuc #define backdoor_out PREFIX(backdoor_out) 13433d6423SLionel Sambuc u32_t backdoor(u32_t ptr[6]); 14433d6423SLionel Sambuc u32_t backdoor_in(u32_t ptr[6]); 15433d6423SLionel Sambuc u32_t backdoor_out(u32_t ptr[6]); 16433d6423SLionel Sambuc 17433d6423SLionel Sambuc /* channel.c */ 18433d6423SLionel Sambuc #define channel_open PREFIX(channel_open) 19433d6423SLionel Sambuc #define channel_close PREFIX(channel_close) 20433d6423SLionel Sambuc #define channel_send PREFIX(channel_send) 21433d6423SLionel Sambuc #define channel_recv PREFIX(channel_recv) 22433d6423SLionel Sambuc int channel_open(struct channel *ch, u32_t type); 23433d6423SLionel Sambuc void channel_close(struct channel *ch); 24433d6423SLionel Sambuc int channel_send(struct channel *ch, char *buf, int len); 25433d6423SLionel Sambuc int channel_recv(struct channel *ch, char *buf, int max); 26433d6423SLionel Sambuc 27433d6423SLionel Sambuc /* dir.c */ 28*94e65446SDavid van Moolenbroek int hgfs_opendir(const char *path, sffs_dir_t *handle); 29433d6423SLionel Sambuc int hgfs_readdir(sffs_dir_t handle, unsigned int index, char *buf, size_t size, 30433d6423SLionel Sambuc struct sffs_attr *attr); 31433d6423SLionel Sambuc int hgfs_closedir(sffs_dir_t handle); 32433d6423SLionel Sambuc 33433d6423SLionel Sambuc /* error.c */ 34433d6423SLionel Sambuc #define error_convert PREFIX(error_convert) 35433d6423SLionel Sambuc int error_convert(int err); 36433d6423SLionel Sambuc 37433d6423SLionel Sambuc /* file.c */ 38*94e65446SDavid van Moolenbroek int hgfs_open(const char *path, int flags, int mode, sffs_file_t *handle); 39433d6423SLionel Sambuc ssize_t hgfs_read(sffs_file_t handle, char *buf, size_t size, u64_t offset); 40433d6423SLionel Sambuc ssize_t hgfs_write(sffs_file_t handle, char *buf, size_t len, u64_t offset); 41433d6423SLionel Sambuc int hgfs_close(sffs_file_t handle); 42433d6423SLionel Sambuc size_t hgfs_readbuf(char **ptr); 43433d6423SLionel Sambuc size_t hgfs_writebuf(char **ptr); 44433d6423SLionel Sambuc 45433d6423SLionel Sambuc /* info.c */ 46*94e65446SDavid van Moolenbroek int hgfs_queryvol(const char *path, u64_t *free, u64_t *total); 47433d6423SLionel Sambuc 48433d6423SLionel Sambuc /* link.c */ 49*94e65446SDavid van Moolenbroek int hgfs_mkdir(const char *path, int mode); 50*94e65446SDavid van Moolenbroek int hgfs_unlink(const char *path); 51*94e65446SDavid van Moolenbroek int hgfs_rmdir(const char *path); 52*94e65446SDavid van Moolenbroek int hgfs_rename(const char *opath, const char *npath); 53433d6423SLionel Sambuc 54433d6423SLionel Sambuc /* path.c */ 55433d6423SLionel Sambuc #define path_put PREFIX(path_put) 56433d6423SLionel Sambuc #define path_get PREFIX(path_get) 57*94e65446SDavid van Moolenbroek void path_put(const char *path); 58433d6423SLionel Sambuc int path_get(char *path, int max); 59433d6423SLionel Sambuc 60433d6423SLionel Sambuc /* rpc.c */ 61433d6423SLionel Sambuc #define rpc_open PREFIX(rpc_open) 62433d6423SLionel Sambuc #define rpc_query PREFIX(rpc_query) 63433d6423SLionel Sambuc #define rpc_test PREFIX(rpc_test) 64433d6423SLionel Sambuc #define rpc_close PREFIX(rpc_close) 65433d6423SLionel Sambuc int rpc_open(void); 66433d6423SLionel Sambuc int rpc_query(void); 67433d6423SLionel Sambuc int rpc_test(void); 68433d6423SLionel Sambuc void rpc_close(void); 69433d6423SLionel Sambuc 70433d6423SLionel Sambuc /* time.c */ 71433d6423SLionel Sambuc #define time_init PREFIX(time_init) 72433d6423SLionel Sambuc #define time_put PREFIX(time_put) 73433d6423SLionel Sambuc #define time_get PREFIX(time_get) 74433d6423SLionel Sambuc void time_init(void); 75433d6423SLionel Sambuc void time_put(struct timespec *tsp); 76433d6423SLionel Sambuc void time_get(struct timespec *tsp); 77