X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=guestfs.pod;h=3c28b04df336fa8bc565c9e17df7b193179f9751;hb=1cf85b1e60e85c4940869c6291d75ac44a5bd190;hp=829e6e552c8f4ffee94c7acf4c15044496f432ac;hpb=8d0068a752ee8e6bc223de5cb7cac5d190a8855e;p=libguestfs.git diff --git a/guestfs.pod b/guestfs.pod index 829e6e5..3c28b04 100644 --- a/guestfs.pod +++ b/guestfs.pod @@ -34,8 +34,7 @@ schemes, qcow, qcow2, vmdk. Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, what filesystem is in each LV, etc.). It can also run commands -in the context of the guest. Also you can mount guest filesystems on -the host (requires root privs and NFS). +in the context of the guest. Also you can access filesystems over FTP. Libguestfs is a library that can be linked with C and C++ management programs (or management programs written in other languages, if people @@ -238,6 +237,60 @@ situations. This returns the current out of memory handler. +=head1 PATH + +Libguestfs needs a kernel and initrd.img, which it finds by looking +along an internal path. + +By default it looks for these in the directory C<$libdir/guestfs> +(eg. C or C). + +Use C or set the environment variable +C to change the directories that libguestfs will +search in. The value is a colon-separated list of paths. The current +directory is I searched unless the path contains an empty element +or C<.>. For example C would +search the current directory and then C. + +=head2 guestfs_set_path + + void guestfs_set_path (guestfs_h *handle, const char *path); + +Set the path that libguestfs searches for kernel and initrd.img. + +The default is C<$libdir/guestfs> unless overridden by setting +C environment variable. + +The string C is stashed in the libguestfs handle, so the caller +must make sure it remains valid for the lifetime of the handle. + +Setting C to C restores the default path. + +=head2 guestfs_get_path + + const char *guestfs_get_path (guestfs_h *handle); + +Return the current search path. + +This is always non-NULL. If it wasn't set already, then this will +return the default path. + +=head1 AUTOSYNC + +=head2 guestfs_set_autosync + + void guestfs_set_autosync (guestfs_h *handle, int autosync); + +If C is true, this enables autosync. Libguestfs will make a +best effort attempt to run C when the handle is closed +(also if the program exits without closing handles). + +=head2 guestfs_get_autosync + + int guestfs_get_autosync (guestfs_h *handle); + +Get the autosync flag. + =head1 VERBOSE MESSAGES =head2 guestfs_set_verbose @@ -257,14 +310,7 @@ This returns the verbose messages flag. =head1 HIGH-LEVEL API ACTIONS - - - - - - - - +@ACTIONS@ =head1 STATE MACHINE AND LOW-LEVEL EVENT API @@ -366,6 +412,8 @@ this function with C set to C. =head2 NON-BLOCKING ACTIONS +XXX NOT IMPLEMENTED YET XXX + C is the most interesting callback to play with, since it allows you to perform actions without blocking. @@ -391,8 +439,7 @@ For example: } There are C and C functions -corresponding to (very nearly) every C action in the -high-level API. +corresponding to every C action in the high-level API. =head2 guestfs_set_reply_callback @@ -405,6 +452,10 @@ The callback function C will be called whenever a reply is received from the child process. (This corresponds to a transition from the BUSY state to the READY state). +Note that the C that you get in the callback is in C +mode, and you need to consume it before you return from the callback +function (since it gets destroyed after). + =head2 guestfs_set_log_message_callback typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque, @@ -537,13 +588,28 @@ function, eg. C. In those cases, ignore this call. This isn't documented. Please see the libguestfs-select and libguestfs-glib implementations. -=head1 SEE ALSO +=head1 ENVIRONMENT VARIABLES + +=over 4 -L +=item LIBGUESTFS_DEBUG +Set C to enable verbose messages. This +has the same effect as calling C. +=item LIBGUESTFS_PATH +Set the path that libguestfs uses to search for kernel and initrd.img. +See the discussion of paths in C above. + +=back + +=head1 SEE ALSO +L, +L, +L, +L. =head1 AUTHORS