diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-02-15 17:11:20 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-02-15 17:11:20 +0000 |
commit | 08d7f2d862ba04aede40546d9721dfe1f6c9a2eb (patch) | |
tree | df4339432eabb553d095933e1d6e44aaf14117d3 /netfs/fuse | |
parent | Rename configs for uniqueness (diff) | |
download | netfs-08d7f2d862ba04aede40546d9721dfe1f6c9a2eb.tar.bz2 netfs-08d7f2d862ba04aede40546d9721dfe1f6c9a2eb.tar.xz netfs-08d7f2d862ba04aede40546d9721dfe1f6c9a2eb.zip |
Refactor fuse lib deps into final exe
Diffstat (limited to 'netfs/fuse')
-rw-r--r-- | netfs/fuse/Jamfile.jam | 3 | ||||
-rw-r--r-- | netfs/fuse/fuseApp.h | 2 | ||||
-rw-r--r-- | netfs/fuse/netfs.cpp | 17 |
3 files changed, 19 insertions, 3 deletions
diff --git a/netfs/fuse/Jamfile.jam b/netfs/fuse/Jamfile.jam index 737c6c8..c5d3a7a 100644 --- a/netfs/fuse/Jamfile.jam +++ b/netfs/fuse/Jamfile.jam @@ -42,7 +42,6 @@ lib netfsClient : <library>../lib//netfsCommon <library>..//boost_thread <library>..//boost_system - <library>fuse <library>..//Ice <library>..//IceUtil <library>..//pthread @@ -57,11 +56,11 @@ lib netfsClient : <library>netfsClientConfiguration <implicit-dependency>netfsClientConfiguration <define>_FILE_OFFSET_BITS=64 - <library>fuse ; exe netfs : netfs.cpp : <library>netfsClient + <library>fuse ; diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h index 4eb01ff..4786591 100644 --- a/netfs/fuse/fuseApp.h +++ b/netfs/fuse/fuseApp.h @@ -78,6 +78,8 @@ namespace NetFS { // stuff int onError(const std::exception & err) throw(); + virtual struct fuse_context * fuse_get_context() = 0; + private: void setProxy(OpenFilePtr, uint64_t & fh); OpenFilePtr getFileProxy(uint64_t localID) const; diff --git a/netfs/fuse/netfs.cpp b/netfs/fuse/netfs.cpp index de89660..21689f2 100644 --- a/netfs/fuse/netfs.cpp +++ b/netfs/fuse/netfs.cpp @@ -1,8 +1,23 @@ #include "fuseApp.h" +class FuseImpl : public NetFS::FuseApp { + public: + FuseImpl(int & argc, char ** argv) : NetFS::FuseApp(argc, argv) { } + + struct fuse_context * fuse_get_context() override + { + return ::fuse_get_context(); + } + + int fuse_opt_parse(struct fuse_args * args, void * data, const struct fuse_opt opts[], fuse_opt_proc_t proc) override + { + return ::fuse_opt_parse(args, data, opts, proc); + } +}; + int main(int argc, char* argv[]) { - return FuseAppBase::run(argc, argv, new NetFS::FuseApp(argc, argv)); + return FuseAppBase::run(argc, argv, new FuseImpl(argc, argv)); } |