summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-10-21 00:50:00 +0000
committerrandomdan <randomdan@localhost>2010-10-21 00:50:00 +0000
commitea88a0efb8247c3617ff23223f2a3813bb73513c (patch)
treedb49502385c1ab8229d5b5ccd859e0385b1dc16e
parentAdd init script (diff)
downloadnetfs-ea88a0efb8247c3617ff23223f2a3813bb73513c.tar.bz2
netfs-ea88a0efb8247c3617ff23223f2a3813bb73513c.tar.xz
netfs-ea88a0efb8247c3617ff23223f2a3813bb73513c.zip
Specify config file in device name
-rw-r--r--netfs/fuse.cpp4
-rw-r--r--netfs/fuse.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/netfs/fuse.cpp b/netfs/fuse.cpp
index daaf788..008ba27 100644
--- a/netfs/fuse.cpp
+++ b/netfs/fuse.cpp
@@ -78,7 +78,9 @@ NetFS::opt_parse(void *, const char * arg, int key, struct fuse_args *)
return 1;
}
else if (exportName.empty()) {
- exportName = arg;
+ const char * colon = strchr(arg, ':');
+ exportName = colon + 1;
+ configPath.assign(arg, colon);
return 0;
}
else if (mountPoint.empty()) {
diff --git a/netfs/fuse.h b/netfs/fuse.h
index 707b368..ede0d2b 100644
--- a/netfs/fuse.h
+++ b/netfs/fuse.h
@@ -54,6 +54,7 @@ class NetFS : public FuseAppBase
std::string mountPoint;
std::string exportName;
+ std::string configPath;
};
#endif