X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=guestfs.pod;h=61d51b7df78febe3e852d1c5b2c88dd865ff395f;hb=9c5ea364505f9f2553a20e93b78a61e3953eacf8;hp=b0fa5f29a7c75738414ca02b5e6ea415c2a42151;hpb=163e399a001a300a53a4c99887742608d23e09ad;p=libguestfs.git diff --git a/guestfs.pod b/guestfs.pod index b0fa5f2..61d51b7 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 @@ -257,40 +256,7 @@ This returns the verbose messages flag. =head1 HIGH-LEVEL API ACTIONS -=head2 guestfs_sync - int guestfs_sync (guestfs_h *handle); - -This syncs the disk, so that any writes are flushed through to the -underlying disk image. - -You should always call this if you have modified a disk image, before -calling C. - -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - -Documentation will be auto-generated from here, including for -guestfs_sync. - -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - - do_[action] ([parameters]) - { - guestfs_set_reply_callback (handle, [action]_cb, data); - guestfs_nb_[action] (handle, [parameters ...]); - - guestfs_main_loop_run (); /* --> blocks, then calls my_cb */ - } - - [action]_cb (guestfs_h *handle, void *data) - { - retval = guestfs_nb_[action]_r (handle); - /* ... */ - guestfs_main_loop_quit (); - return retval; - } - -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -399,6 +365,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. @@ -424,8 +392,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 @@ -438,6 +405,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,