rework config management

* Add standard way to do str2val and val2str conversion
* Add support for a config file
* Add support for reading and writing settings via ioctl
This commit is contained in:
Antonio SJ Musumeci 2019-09-24 10:27:46 -04:00
parent 8d989777f8
commit 54c41c4994
90 changed files with 3292 additions and 2619 deletions

View file

@ -155,15 +155,25 @@ namespace l
main(const int argc_,
char **argv_)
{
fuse_args args;
fuse_operations ops = {0};
Config config;
Config config;
fuse_args args;
fuse_operations ops;
std::vector<std::string> errs;
memset(&ops,0,sizeof(fuse_operations));
args.argc = argc_;
args.argv = argv_;
args.allocated = 0;
options::parse(&args,&config);
options::parse(&args,&config,&errs);
if(errs.size())
{
for(uint64_t i = 0; i < errs.size(); i++)
std::cerr << "* ERROR: " << errs[i] << std::endl;
return 1;
}
l::setup_resources();
l::get_fuse_operations(ops,config.nullrw);