mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user