diff options
| author | randomdan <randomdan@localhost> | 2010-10-21 01:20:18 +0000 | 
|---|---|---|
| committer | randomdan <randomdan@localhost> | 2010-10-21 01:20:18 +0000 | 
| commit | f929fbf3e567ca721dba966960f4e471310ebdc7 (patch) | |
| tree | c3985bc4fb287610c73f1a0190bb57023a57cf4e | |
| parent | Specify config file in device name (diff) | |
| download | netfs-f929fbf3e567ca721dba966960f4e471310ebdc7.tar.bz2 netfs-f929fbf3e567ca721dba966960f4e471310ebdc7.tar.xz netfs-f929fbf3e567ca721dba966960f4e471310ebdc7.zip  | |
Use the config path given
| -rw-r--r-- | netfs/fuse.cpp | 2 | ||||
| -rw-r--r-- | netfs/fuseConfig.cpp | 4 | ||||
| -rw-r--r-- | netfs/fuseConfig.h | 2 | 
3 files changed, 4 insertions, 4 deletions
diff --git a/netfs/fuse.cpp b/netfs/fuse.cpp index 008ba27..1b743f2 100644 --- a/netfs/fuse.cpp +++ b/netfs/fuse.cpp @@ -100,7 +100,7 @@ void *  NetFS::init(struct fuse_conn_info *)  {  	puts(exportName.c_str()); -	FuseConfigPtr fc = FuseConfig::Load("client.xml"); +	FuseConfigPtr fc = FuseConfig::Load(configPath);  	FuseConfig::ExportPtr e = fc->exports[exportName];  	const std::string & ep = *e->endpoints.begin(); diff --git a/netfs/fuseConfig.cpp b/netfs/fuseConfig.cpp index 26ee6a1..ec364cf 100644 --- a/netfs/fuseConfig.cpp +++ b/netfs/fuseConfig.cpp @@ -2,9 +2,9 @@  #include <string.h>  FuseConfigPtr -FuseConfig::Load(const char * path) +FuseConfig::Load(const std::string & path)  { -	xmlDoc * doc = xmlReadFile(path, NULL, 0); +	xmlDoc * doc = xmlReadFile(path.c_str(), NULL, 0);  	FuseConfigPtr dc = new FuseConfig(doc->children);  	xmlFreeDoc(doc);  	return dc; diff --git a/netfs/fuseConfig.h b/netfs/fuseConfig.h index 5416360..f33c8f7 100644 --- a/netfs/fuseConfig.h +++ b/netfs/fuseConfig.h @@ -23,7 +23,7 @@ class FuseConfig : public virtual IntrusivePtrBase {  		};  		FuseConfig(xmlNodePtr); -		static boost::intrusive_ptr<FuseConfig>	Load(const char * path); +		static boost::intrusive_ptr<FuseConfig>	Load(const std::string & path);  		ExportMap		exports;  };  | 
