Blob


1 #include <u.h>
2 #include <errno.h>
3 #include <sys/stat.h>
4 #include <sys/uio.h>
5 #include <sys/socket.h>
6 #include <libc.h>
7 #include <fcall.h>
8 #include <thread.h>
9 #include <9pclient.h>
10 #include "fuse_kernel.h"
12 /* Somehow the FUSE guys forgot to define this one! */
13 struct fuse_create_out {
14 struct fuse_entry_out e;
15 struct fuse_open_out o;
16 };
18 typedef struct FuseMsg FuseMsg;
19 struct FuseMsg
20 {
21 FuseMsg *next;
22 uchar *buf;
23 int nbuf;
24 struct fuse_in_header *hdr; /* = buf */
25 void *tx; /* = hdr+1 */
26 };
28 extern int debug;
30 extern int fusefd;
31 extern int fuseeof;
32 extern int fusebufsize;
33 extern int fusemaxwrite;
34 extern FuseMsg *fusemsglist;
35 extern char *fusemtpt;
37 void freefusemsg(FuseMsg *m);
38 int fusefmt(Fmt*);
39 void initfuse(char *mtpt);
40 void waitfuse(void);
41 FuseMsg* readfusemsg(void);
42 void replyfuse(FuseMsg *m, void *arg, int narg);
43 void replyfuseerrno(FuseMsg *m, int e);
44 void replyfuseerrstr(FuseMsg*);
45 void request9p(Fcall *tx);
47 void* emalloc(uint n);
48 void* erealloc(void *p, uint n);
49 char* estrdup(char *p);
51 int errstr2errno(void);
52 void unmountatexit(void);