X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfs-actions.pod;h=dcc8b50d39dab3b7376f76fd1c200755c9f7686f;hp=d57dae3802f3acca4396b10e4d8b8a93d8a72f5a;hb=cf13c86a2c6fd56c07d7a92bcd28f99598c6a259;hpb=170f262f0413de843af62b968f6d12c1c476ae7f diff --git a/guestfs-actions.pod b/guestfs-actions.pod index d57dae3..dcc8b50 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -388,6 +388,56 @@ Because of the message protocol, there is a transfer limit of somewhere between 2MB and 4MB. To transfer large files you should use FTP. +=head2 guestfs_checksum + + char *guestfs_checksum (guestfs_h *handle, + const char *csumtype, + const char *path); + +This call computes the MD5, SHAx or CRC checksum of the +file named C. + +The type of checksum to compute is given by the C +parameter which must have one of the following values: + +=over 4 + +=item C + +Compute the cyclic redundancy check (CRC) specified by POSIX +for the C command. + +=item C + +Compute the MD5 hash (using the C program). + +=item C + +Compute the SHA1 hash (using the C program). + +=item C + +Compute the SHA224 hash (using the C program). + +=item C + +Compute the SHA256 hash (using the C program). + +=item C + +Compute the SHA384 hash (using the C program). + +=item C + +Compute the SHA512 hash (using the C program). + +=back + +The checksum is returned as a printable string. + +This function returns a string, or NULL on error. +I. + =head2 guestfs_chmod int guestfs_chmod (guestfs_h *handle, @@ -535,6 +585,18 @@ return the default path. This function returns a string, or NULL on error. The string is owned by the guest handle and must I be freed. +=head2 guestfs_get_qemu + + const char *guestfs_get_qemu (guestfs_h *handle); + +Return the current qemu binary. + +This is always non-NULL. If it wasn't set already, then this will +return the default qemu binary name. + +This function returns a string, or NULL on error. +The string is owned by the guest handle and must I be freed. + =head2 guestfs_get_state int guestfs_get_state (guestfs_h *handle); @@ -827,6 +889,44 @@ call, in order to improve reliability. This function returns 0 on success or -1 on error. +=head2 guestfs_mount_options + + int guestfs_mount_options (guestfs_h *handle, + const char *options, + const char *device, + const char *mountpoint); + +This is the same as the C command, but it +allows you to set the mount options as for the +L I<-o> flag. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mount_ro + + int guestfs_mount_ro (guestfs_h *handle, + const char *device, + const char *mountpoint); + +This is the same as the C command, but it +mounts the filesystem with the read-only (I<-o ro>) flag. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mount_vfs + + int guestfs_mount_vfs (guestfs_h *handle, + const char *options, + const char *vfstype, + const char *device, + const char *mountpoint); + +This is the same as the C command, but it +allows you to set both the mount options and the vfstype +as for the L I<-o> and I<-t> flags. + +This function returns 0 on success or -1 on error. + =head2 guestfs_mounts char **guestfs_mounts (guestfs_h *handle); @@ -966,6 +1066,26 @@ Setting C to C restores the default path. This function returns 0 on success or -1 on error. +=head2 guestfs_set_qemu + + int guestfs_set_qemu (guestfs_h *handle, + const char *qemu); + +Set the qemu binary that we will use. + +The default is chosen when the library was compiled by the +configure script. + +You can also override this by setting the 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 qemu binary. + +This function returns 0 on success or -1 on error. + =head2 guestfs_set_ready int guestfs_set_ready (guestfs_h *handle); @@ -1065,6 +1185,58 @@ closing the handle. This function returns 0 on success or -1 on error. +=head2 guestfs_tar_in + + int guestfs_tar_in (guestfs_h *handle, + const char *tarfile, + const char *directory); + +This command uploads and unpacks local file C (an +I tar file) into C. + +To upload a compressed tarball, use C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_tar_out + + int guestfs_tar_out (guestfs_h *handle, + const char *directory, + const char *tarfile); + +This command packs the contents of C and downloads +it to local file C. + +To download a compressed tarball, use C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_tgz_in + + int guestfs_tgz_in (guestfs_h *handle, + const char *tarball, + const char *directory); + +This command uploads and unpacks local file C (a +I tar file) into C. + +To upload an uncompressed tarball, use C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_tgz_out + + int guestfs_tgz_out (guestfs_h *handle, + const char *directory, + const char *tarball); + +This command packs the contents of C and downloads +it to local file C. + +To download an uncompressed tarball, use C. + +This function returns 0 on success or -1 on error. + =head2 guestfs_touch int guestfs_touch (guestfs_h *handle,