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 3d132f2920.
This commit is contained in:
Richard W.M. Jones
2013-09-02 19:37:57 +01:00
parent 3d132f2920
commit 091eb07803

View File

@@ -95,26 +95,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;
}