forked from pool/libguestfs
Olaf Hering
c11c64b00d
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=243
47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
From 5ad4d2c2ecc3d7d74e34eedfe00a61bc7bebc8f0 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Fri, 18 Oct 2013 14:58:20 +0100
|
|
Subject: Revert "daemon: augeas: Enhance error reporting for aug_init
|
|
failures."
|
|
|
|
This reverts commit 272cc56876b9a3449da2fdfff546c598497d846d.
|
|
|
|
See:
|
|
https://www.redhat.com/archives/libguestfs/2013-October/msg00035.html
|
|
---
|
|
daemon/augeas.c | 16 +---------------
|
|
1 file changed, 1 insertion(+), 15 deletions(-)
|
|
|
|
diff --git a/daemon/augeas.c b/daemon/augeas.c
|
|
index 9d6a553..83e2739 100644
|
|
--- a/daemon/augeas.c
|
|
+++ b/daemon/augeas.c
|
|
@@ -98,26 +98,12 @@ 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;
|
|
+ reply_with_error ("Augeas initialization failed");
|
|
return -1;
|
|
}
|
|
-#endif
|
|
|
|
return 0;
|
|
}
|