custom message type for VM_INFO
[minix3.git] / lib / libhgfs / hgfs.c
bloba7cbce5ff2129e9ab158c4318cf2a17f0017acf6
1 /* Part of libhgfs - (c) 2009, D.C. van Moolenbroek */
3 #include "inc.h"
5 struct sffs_table hgfs_table = {
6 .t_open = hgfs_open,
7 .t_read = hgfs_read,
8 .t_write = hgfs_write,
9 .t_close = hgfs_close,
11 .t_readbuf = hgfs_readbuf,
12 .t_writebuf = hgfs_writebuf,
14 .t_opendir = hgfs_opendir,
15 .t_readdir = hgfs_readdir,
16 .t_closedir = hgfs_closedir,
18 .t_getattr = hgfs_getattr,
19 .t_setattr = hgfs_setattr,
21 .t_mkdir = hgfs_mkdir,
22 .t_unlink = hgfs_unlink,
23 .t_rmdir = hgfs_rmdir,
24 .t_rename = hgfs_rename,
26 .t_queryvol = hgfs_queryvol,
29 /*===========================================================================*
30 * hgfs_init *
31 *===========================================================================*/
32 int hgfs_init(const struct sffs_table **tablep)
34 /* Initialize the library. Return OK on success, or a negative error code
35 * otherwise. If EAGAIN is returned, shared folders are disabled.
37 int r;
39 time_init();
41 r = rpc_open();
43 if (r == OK)
44 *tablep = &hgfs_table;
46 return r;
49 /*===========================================================================*
50 * hgfs_cleanup *
51 *===========================================================================*/
52 void hgfs_cleanup()
54 /* Clean up state.
57 rpc_close();