[augeas-devel] aug_srun: new API call to execute several commands

lutter at redhat.com lutter at redhat.com
Wed Jul 20 23:59:28 UTC 2011


This is a preliminary patch to add a call to the API that allows executing
multiple commands, similar to what augtool does today.

The new call is aug_srun(struct augeas *aug, FILE *out, const char *text);
it will run one or more newline-separated commands from TEXT, print their
output to OUT, and returns the number of commands executed, -1 on error, or
-2 when one of the commands is 'quit'. If there was an error, details can
be found with the aug_error* calls.

This might still change somewhat, but I would appreciate any testing people
can do, and in particular any feedback on the API - whether we need to take
additional parameters, need different error returns etc.

David




More information about the augeas-devel mailing list