X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfs-actions.pod;h=7c5223bbcb7cb15771832473e7b7e89ef60002d3;hp=b54917e52397c12de2966f03c8bc5d15d841f8b2;hb=9501ab7792e50e464dc65e9190a0e1d84b5dd423;hpb=94050e0344685b6916e21581e618ad3e85795008 diff --git a/guestfs-actions.pod b/guestfs-actions.pod index b54917e..7c5223b 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -29,6 +29,346 @@ This is equivalent to the qemu parameter C<-drive file=filename>. This function returns 0 on success or -1 on error. +=head2 guestfs_aug_close + + int guestfs_aug_close (guestfs_h *handle); + +Close the current Augeas handle and free up any resources +used by it. After calling this, you have to call +C again before you can use any other +Augeas functions. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_aug_defnode + + struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *handle, + const char *name, + const char *expr, + const char *val); + +Defines a variable C whose value is the result of +evaluating C. + +If C evaluates to an empty nodeset, a node is created, +equivalent to calling C C, C. +C will be the nodeset containing that single node. + +On success this returns a pair containing the +number of nodes in the nodeset, and a boolean flag +if a node was created. + +This function returns a C, +or NULL if there was an error. +I after use>. + +=head2 guestfs_aug_defvar + + int guestfs_aug_defvar (guestfs_h *handle, + const char *name, + const char *expr); + +Defines an Augeas variable C whose value is the result +of evaluating C. If C is NULL, then C is +undefined. + +On success this returns the number of nodes in C, or +C<0> if C evaluates to something which is not a nodeset. + +On error this function returns -1. + +=head2 guestfs_aug_get + + char *guestfs_aug_get (guestfs_h *handle, + const char *path); + +Look up the value associated with C. If C +matches exactly one node, the C is returned. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_aug_init + + int guestfs_aug_init (guestfs_h *handle, + const char *root, + int flags); + +Create a new Augeas handle for editing configuration files. +If there was any previous Augeas handle associated with this +guestfs session, then it is closed. + +You must call this before using any other C +commands. + +C is the filesystem root. C must not be NULL, +use C instead. + +The flags are the same as the flags defined in +Eaugeas.hE, the logical I of the following +integers: + +=over 4 + +=item C = 1 + +Keep the original file with a C<.augsave> extension. + +=item C = 2 + +Save changes into a file with extension C<.augnew>, and +do not overwrite original. Overrides C. + +=item C = 4 + +Typecheck lenses (can be expensive). + +=item C = 8 + +Do not use standard load path for modules. + +=item C = 16 + +Make save a no-op, just record what would have been changed. + +=item C = 32 + +Do not load the tree in C. + +=back + +To close the handle, you can call C. + +To find out more about Augeas, see L. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_aug_insert + + int guestfs_aug_insert (guestfs_h *handle, + const char *path, + const char *label, + int before); + +Create a new sibling C