summaryrefslogtreecommitdiffstats
path: root/daemon/augeas.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-07-07 13:42:34 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-07 13:42:34 +0100
commitd5532e9ad29b28c2b323ad0abe4e0caa6e03f675 (patch)
tree14eda67960afaf590159df7ac3ef89b44b0172e3 /daemon/augeas.c
parent6c87a747cae61097915c71f6d505f101579e8c7a (diff)
downloadlibguestfs-d5532e9ad29b28c2b323ad0abe4e0caa6e03f675.tar.gz
libguestfs-d5532e9ad29b28c2b323ad0abe4e0caa6e03f675.tar.xz
libguestfs-d5532e9ad29b28c2b323ad0abe4e0caa6e03f675.zip
Generate structs and struct lists generically.
This modifies the way that struct and struct lists are generated (for return values) so that there is no need to add an explicit new type when adding a new structure. All tests pass, and the C API should be compatible. I have also inspected the changes that are made to the generated code by hand.
Diffstat (limited to 'daemon/augeas.c')
-rw-r--r--daemon/augeas.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/daemon/augeas.c b/daemon/augeas.c
index 383812f8..f75a1d6f 100644
--- a/daemon/augeas.c
+++ b/daemon/augeas.c
@@ -122,21 +122,21 @@ do_aug_defvar (char *name, char *expr)
#endif
}
-guestfs_aug_defnode_ret *
+guestfs_int_int_bool *
do_aug_defnode (char *name, char *expr, char *val)
{
#ifdef HAVE_AUG_DEFNODE
- static guestfs_aug_defnode_ret r;
+ static guestfs_int_int_bool r;
int created;
NEED_AUG (NULL);
- r.nrnodes = aug_defnode (aug, name, expr, val, &created);
- if (r.nrnodes == -1) {
+ r.i = aug_defnode (aug, name, expr, val, &created);
+ if (r.i == -1) {
reply_with_error ("Augeas defnode failed");
return NULL;
}
- r.created = created;
+ r.b = created;
return &r;
#else
reply_with_error ("%s is not available", __func__);