[augeas-devel] augeas: master - Rename aug_tree_replace to tree_replace
David Lutterkort
lutter at fedoraproject.org
Sat Jan 31 00:57:46 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=aaafb57ca0d9a630ab64cb43fe32416409000864
Commit: aaafb57ca0d9a630ab64cb43fe32416409000864
Parent: 6bdc40a07280736c11ccaf4a99f7db514f3bd8cc
Author: David Lutterkort <lutter at redhat.com>
AuthorDate: Sat Jan 17 22:05:42 2009 -0800
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Fri Jan 30 16:54:44 2009 -0800
Rename aug_tree_replace to tree_replace
We reserve the aug_ prefix for public functions. There is also no need to
pass struct augeas here, a tree root is enough.
---
src/augeas.c | 4 ++--
src/internal.h | 2 +-
src/transform.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/augeas.c b/src/augeas.c
index 7586ee7..b3ec44b 100644
--- a/src/augeas.c
+++ b/src/augeas.c
@@ -426,11 +426,11 @@ int aug_rm(struct augeas *aug, const char *path) {
return tree_rm(aug->origin, path);
}
-int aug_tree_replace(struct augeas *aug, const char *path, struct tree *sub) {
+int tree_replace(struct tree *origin, const char *path, struct tree *sub) {
struct tree *parent;
int r;
- r = aug_rm(aug, path);
+ r = tree_rm(origin, path);
if (r == -1)
goto error;
diff --git a/src/internal.h b/src/internal.h
index 57be267..a241e8e 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -304,7 +304,7 @@ struct tree *make_tree(char *label, char *value,
*/
struct tree *make_tree_origin(struct tree *root);
-int aug_tree_replace(struct augeas *aug, const char *path, struct tree *sub);
+int tree_replace(struct tree *origin, const char *path, struct tree *sub);
int tree_rm(struct tree *origin, const char *path);
struct tree *tree_set(struct tree *origin, const char *path, const char *value);
diff --git a/src/transform.c b/src/transform.c
index 67f1d77..1efc589 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -372,7 +372,7 @@ static int load_file(struct augeas *aug, struct lens *lens, char *filename) {
goto done;
}
- aug_tree_replace(aug, path, tree);
+ tree_replace(aug->origin, path, tree);
tree = NULL;
result = 0;
More information about the augeas-devel
mailing list