[augeas-devel] [PATCH 1 of 2] Report errors during put
David Lutterkort
dlutter at redhat.com
Wed May 14 00:13:00 UTC 2008
1 file changed, 6 insertions(+)
src/transform.c | 6 ++++++
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1210723941 25200
# Node ID 8a217bbcecadbe3488818e0d28b840e7eb2533b2
# Parent 23308c7b8a7b2cf3b059fb7d5517b1d534e187cc
Report errors during put
diff -r 23308c7b8a7b -r 8a217bbcecad src/transform.c
--- a/src/transform.c Tue May 13 16:09:31 2008 -0700
+++ b/src/transform.c Tue May 13 17:12:21 2008 -0700
@@ -324,6 +324,12 @@ int transform_save(struct augeas *aug, s
goto done;
fp = NULL;
+ if (err != NULL) {
+ err_status = "put_failed";
+ unlink(augnew);
+ goto done;
+ }
+
if (!(aug->flags & AUG_SAVE_NEWFILE)) {
if (aug->flags & AUG_SAVE_BACKUP) {
int r;
More information about the augeas-devel
mailing list