summaryrefslogtreecommitdiff
path: root/src/cstore/unionfs
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-07-30 09:53:00 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-07-30 09:53:00 -0700
commitdc4bd2c05375cece9d1c1281cbebbef40a09c4e4 (patch)
tree1ad940cb817d22726b1e1f763f12b0e11f3a5acc /src/cstore/unionfs
parent56dc9db80960f62f021958baba29c49dda895b03 (diff)
downloadvyatta-cfg-dc4bd2c05375cece9d1c1281cbebbef40a09c4e4.tar.gz
vyatta-cfg-dc4bd2c05375cece9d1c1281cbebbef40a09c4e4.zip
add default status observers
Diffstat (limited to 'src/cstore/unionfs')
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp5
-rw-r--r--src/cstore/unionfs/cstore-unionfs.hpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp
index 6e6e5de..3e94778 100644
--- a/src/cstore/unionfs/cstore-unionfs.cpp
+++ b/src/cstore/unionfs/cstore-unionfs.cpp
@@ -662,9 +662,10 @@ UnionfsCstore::unmark_display_default()
}
bool
-UnionfsCstore::marked_display_default()
+UnionfsCstore::marked_display_default(bool active_cfg)
{
- b_fs::path marker = get_work_path() / C_MARKER_DEF_VALUE;
+ b_fs::path marker = (active_cfg ? get_active_path() : get_work_path())
+ / C_MARKER_DEF_VALUE;
return b_fs::exists(marker);
}
diff --git a/src/cstore/unionfs/cstore-unionfs.hpp b/src/cstore/unionfs/cstore-unionfs.hpp
index dd44d9a..8bec974 100644
--- a/src/cstore/unionfs/cstore-unionfs.hpp
+++ b/src/cstore/unionfs/cstore-unionfs.hpp
@@ -165,13 +165,13 @@ private:
// observers for work path
bool marked_changed();
- bool marked_display_default();
// observers for work path or active path
bool cfg_node_exists(bool active_cfg);
bool read_value_vec(vector<string>& vvec, bool active_cfg);
bool marked_deactivated(bool active_cfg);
bool get_comment(string& comment, bool active_cfg);
+ bool marked_display_default(bool active_cfg);
// observers during commit operation
bool marked_committed(const vtw_def& def, bool is_set);