1 file changed, 1 insertion(+), 2 deletions(-)
src/augtool.c |    3 +--

# HG changeset patch
# User David Lutterkort <[EMAIL PROTECTED]>
# Date 1216358441 25200
# Node ID bd7bcdd00ab2afa70b1d52fd371025402f8c12e5
# Parent  8dba2bfc0afa71c06b4ca84fb3ee9a7de8a9cc70
augtool: Print '(none)' when getting a path with no value

The output used to be mangled. Now it is 'path = value' if hte path has a
non-NULL value, 'path (none)' if the path exists but has a NULL value, and
'path (o)' if an error occurred.

diff -r 8dba2bfc0afa -r bd7bcdd00ab2 src/augtool.c
--- a/src/augtool.c     Thu Jul 17 11:11:28 2008 -0700
+++ b/src/augtool.c     Thu Jul 17 22:20:41 2008 -0700
@@ -189,9 +189,8 @@
     printf("%s", path);
     if (aug_get(aug, path, &val) != 1) {
         printf(" (o)\n");
-        return;
     } else if (val == NULL) {
-        val = "(none)";
+        printf(" (none)\n");
     } else {
         printf(" = %s\n", val);
     }

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to