out-of-tree build: ruby
[libguestfs.git] / daemon / augeas.c
index 36b36b8..03cba42 100644 (file)
@@ -13,7 +13,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <config.h>
@@ -210,6 +210,26 @@ do_aug_set (const char *path, const char *val)
 }
 
 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