[augeas-devel] Questions on 2 methods

David Lutterkort dlutter at redhat.com
Fri Feb 29 22:14:37 UTC 2008


On Fri, 2008-02-29 at 16:41 -0500, Bryan Kearney wrote:
> /* Write all pending changes to disk */
> int aug_save(void);
> 
> [bk] is the return a boolean, or number of records effected?
> 
> void aug_print(FILE *out, const char *path);
> 
> [bk] what does this do?

Ugh ... more missing docs. Just changed augeas.h to say:

/* Write all pending changes to disk. Return -1 if an error is
encountered, 0 on success.
 */
int aug_save(void);

/* Print the subtree starting at PATH to OUT */
void aug_print(FILE *out, const char *path);

aug_print is what drives the print command in augtool.

There's one biggish change to the public API that I plan for some (not
too distant) point in the future: add an additional parameter to all the
public API calls that passes the actual tree. The tree is right now
stored in a global variable, and there's some additional info in
globals; obviously, that's ugly, and I want to get rid of that at some
point.

But it shouldn't be too hard to adapt the Ruby bindings for that change.

David




More information about the augeas-devel mailing list