Blob Blame History Raw
From 6beec59965fb3c18ad58d7541199a87d8d7fd4b5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 2 Sep 2013 19:37:57 +0100
Subject: [PATCH] daemon: augeas: Don't test if AUG_NO_ERR_CLOSE is defined.

It's an enum, not a macro, and in any case it has been present in
augeas.h since 0.10.0, and the minimum version that libguestfs
requires is 1.0.0.

This fixes commit 3d132f29204e8c5c77f08841b5288dfe3013f4f0.

(cherry picked from commit 091eb0780349dade778d1ad3412ffacc7ffec9ec)
---
 daemon/augeas.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/daemon/augeas.c b/daemon/augeas.c
index 9d6a553..45338da 100644
--- a/daemon/augeas.c
+++ b/daemon/augeas.c
@@ -98,26 +98,20 @@ do_aug_init (const char *root, int flags)
     return -1;
   }
 
-#ifdef AUG_NO_ERR_CLOSE
   /* Pass AUG_NO_ERR_CLOSE so we can display detailed errors. */
   aug = aug_init (buf, NULL, flags | AUG_NO_ERR_CLOSE);
-#else
-  aug = aug_init (buf, NULL, flags);
-#endif
 
   if (!aug) {
     reply_with_error ("augeas initialization failed");
     return -1;
   }
 
-#ifdef AUG_NO_ERR_CLOSE
   if (aug_error (aug) != AUG_NOERROR) {
     AUGEAS_ERROR ("aug_init: %s (flags %d)", root, flags);
     aug_close (aug);
     aug = NULL;
     return -1;
   }
-#endif
 
   return 0;
 }
-- 
1.8.3.1