}
int
+do_aug_clear (const char *path)
+{
+#ifdef HAVE_AUGEAS
+ int r;
+
+ NEED_AUG (-1);
+
+ r = aug_set (aug, path, NULL);
+ if (r == -1) {
+ reply_with_error ("Augeas clear failed");
+ return -1;
+ }
+
+ return 0;
+#else
+ NOT_AVAILABLE (-1);
+#endif
+}
+
+int
do_aug_insert (const char *path, const char *label, int before)
{
#ifdef HAVE_AUGEAS
[], (* XXX Augeas code needs tests. *)
"set Augeas path to value",
"\
-Set the value associated with C<path> to C<value>.");
+Set the value associated with C<path> to C<val>.
+
+In the Augeas API, it is possible to clear a node by setting
+the value to NULL. Due to an oversight in the libguestfs API
+you cannot do that with this call. Instead you must use the
+C<guestfs_aug_clear> call.");
("aug_insert", (RErr, [String "augpath"; String "label"; Bool "before"]), 21, [Optional "augeas"],
[], (* XXX Augeas code needs tests. *)
as much as possible, using all remaining free space in the volume
group.");
+ ("aug_clear", (RErr, [String "augpath"]), 239, [Optional "augeas"],
+ [], (* XXX Augeas code needs tests. *)
+ "clear Augeas path",
+ "\
+Set the value associated with C<path> to C<NULL>. This
+is the same as the L<augtool(1)> C<clear> command.");
+
]
let all_functions = non_daemon_functions @ daemon_functions