mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 12:26:34 -05:00
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:
parent
8d989777f8
commit
54c41c4994
90 changed files with 3292 additions and 2619 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include "fs_path.hpp"
|
||||
#include "policy.hpp"
|
||||
#include "policy_error.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
|
@ -33,10 +34,12 @@ namespace lus
|
|||
{
|
||||
static
|
||||
int
|
||||
create(const Branches &branches_,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
create(const Branches &branches_,
|
||||
const uint64_t minfreespace,
|
||||
vector<string> *paths)
|
||||
{
|
||||
rwlock::ReadGuard guard(&branches_.lock);
|
||||
|
||||
int rv;
|
||||
int error;
|
||||
uint64_t lus;
|
||||
|
|
@ -70,7 +73,7 @@ namespace lus
|
|||
if(lusbasepath == NULL)
|
||||
return (errno=error,-1);
|
||||
|
||||
paths.push_back(lusbasepath);
|
||||
paths->push_back(*lusbasepath);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -81,7 +84,7 @@ Policy::Func::lus(const Category::Enum::Type type,
|
|||
const Branches &branches_,
|
||||
const char *fusepath,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
vector<string> *paths)
|
||||
{
|
||||
if(type == Category::Enum::create)
|
||||
return lus::create(branches_,minfreespace,paths);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue