[augeas-devel] [PATCH 7/9] Make tree_clean available outside of augeas.c
lutter at redhat.com
lutter at redhat.com
Wed Jun 30 00:52:20 UTC 2010
From: David Lutterkort <lutter at redhat.com>
* src/augeas.c (tree_clean): remove 'static'
* src/internal.h (tree_clean): add prototype
---
src/augeas.c | 3 +--
src/internal.h | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/augeas.c b/src/augeas.c
index 2e5f296..5ca1789 100644
--- a/src/augeas.c
+++ b/src/augeas.c
@@ -74,8 +74,7 @@ static void tree_mark_dirty(struct tree *tree) {
tree->dirty = 1;
}
-/* Clear the dirty flag in the whole TREE */
-static void tree_clean(struct tree *tree) {
+void tree_clean(struct tree *tree) {
if (tree->dirty) {
list_for_each(c, tree->children)
tree_clean(c);
diff --git a/src/internal.h b/src/internal.h
index 51aa025..f1e6f3a 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -379,6 +379,8 @@ int dump_tree(FILE *out, struct tree *tree);
int tree_equal(const struct tree *t1, const struct tree *t2);
char *path_expand(struct tree *tree, const char *ppath);
char *path_of_tree(struct tree *tree);
+/* Clear the dirty flag in the whole TREE */
+void tree_clean(struct tree *tree);
/* Return first child with label LABEL or NULL */
struct tree *tree_child(struct tree *tree, const char *label);
/* Return first existing child with label LABEL or create one. Return NULL
--
1.6.6.1
More information about the augeas-devel
mailing list