2 * WvFUSE: A WvStreams library for FUSE.
3 * Copyright (C) 2002 Net Integration Technologies, Inc.
5 * This program can be distributed under the terms of the GNU GPL.
6 * See the file COPYING.
8 * This class implements the main FUSE functions: creating the filesystem,
9 * reading commands, creating objects to process the commands, maintaining
17 #include "wvfuseinomgr.h"
19 #include <wvfdstream.h>
21 #include <wvstreamlist.h>
25 #define FUSE_MAX_PATH 4096
26 #define FUSE_KERNEL_VERSION_ENV "_FUSE_KERNEL_VERSION"
28 typedef long unsigned int fino_t
;
30 /** Enable debuging output */
31 #define FUSE_DEBUG (1 << 1)
33 #define FUSE_INVAL_FD 1
34 #define FUSE_INVAL_PATH 2
37 class MyFDStream
: public WvFDStream
40 MyFDStream(int fd
) : WvFDStream(fd
) {};
41 virtual void seterr(int errnum
)
43 if (errnum
!= ENOENT
) WvStream::seterr(errnum
);
48 class WvFuse
: public WvStreamList
, public WvFuseInoMgr
53 WvFuse(WvFS
*_fs
, UniConf
&_cfg
);
56 virtual bool isok() const;
57 virtual int getfd() const;
59 void send_reply_raw(char *outbuf
, size_t outsize
);
61 void message_handler(int type
, WvStringParm path
);
64 virtual void execute();
66 void do_invalidate(fino_t ino
);