From 281c8eef636834461d69699c30818abcd2d4d92b Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sun, 10 Mar 2024 15:07:23 -0500 Subject: [PATCH] branches2.cpp --- config.toml | 5 ++++- src/branches2.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 1f024458..f328baac 100644 --- a/config.toml +++ b/config.toml @@ -83,6 +83,8 @@ min-free-space = 123 # TIER 0 [[branches.tier]] +enabled = true + [branches.tier.func.create] policy.default = 'mfs' [[branches.tier.func.create.policy.overrides]] @@ -115,10 +117,11 @@ type = 'glob' mode = 'RW' if-not-mountpoint = 'fail' # 'fail' | 'deactivate' ? + # TIER 1 [[branches.tier]] [[branches.tier.branch]] -enabled = true +enabled = false name = 'branch0' type = 'literal' path = '/mnt/*' diff --git a/src/branches2.cpp b/src/branches2.cpp index 84a3ada5..11f76bab 100644 --- a/src/branches2.cpp +++ b/src/branches2.cpp @@ -19,6 +19,12 @@ Branches2::Branches2(toml::value const &v_) for(auto const &tier : tiers.as_array()) { + bool enabled; + + enabled = toml::find_or(tier,"enabled",false); + if(!enabled) + continue; + _branches.emplace_back(tier); } }