Generated code for new mount_* commands.
[libguestfs.git] / perl / lib / Sys / Guestfs.pm
index bd8da0f..ea82659 100644 (file)
@@ -337,6 +337,49 @@ Because of the message protocol, there is a transfer limit
 of somewhere between 2MB and 4MB.  To transfer large files you should use
 FTP.
 
+=item $checksum = $h->checksum ($csumtype, $path);
+
+This call computes the MD5, SHAx or CRC checksum of the
+file named C<path>.
+
+The type of checksum to compute is given by the C<csumtype>
+parameter which must have one of the following values:
+
+=over 4
+
+=item C<crc>
+
+Compute the cyclic redundancy check (CRC) specified by POSIX
+for the C<cksum> command.
+
+=item C<md5>
+
+Compute the MD5 hash (using the C<md5sum> program).
+
+=item C<sha1>
+
+Compute the SHA1 hash (using the C<sha1sum> program).
+
+=item C<sha224>
+
+Compute the SHA224 hash (using the C<sha224sum> program).
+
+=item C<sha256>
+
+Compute the SHA256 hash (using the C<sha256sum> program).
+
+=item C<sha384>
+
+Compute the SHA384 hash (using the C<sha384sum> program).
+
+=item C<sha512>
+
+Compute the SHA512 hash (using the C<sha512sum> program).
+
+=back
+
+The checksum is returned as a printable string.
+
 =item $h->chmod ($mode, $path);
 
 Change the mode (permissions) of C<path> to C<mode>.  Only
@@ -426,6 +469,13 @@ Return the current search path.
 This is always non-NULL.  If it wasn't set already, then this will
 return the default path.
 
+=item $qemu = $h->get_qemu ();
+
+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.
+
 =item $state = $h->get_state ();
 
 This returns the current state as an opaque integer.  This is
@@ -597,6 +647,23 @@ on the underlying device.
 The filesystem options C<sync> and C<noatime> are set with this
 call, in order to improve reliability.
 
+=item $h->mount_options ($options, $device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+allows you to set the mount options as for the
+L<mount(8)> I<-o> flag.
+
+=item $h->mount_ro ($device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+mounts the filesystem with the read-only (I<-o ro>) flag.
+
+=item $h->mount_vfs ($options, $vfstype, $device, $mountpoint);
+
+This is the same as the C<$h-E<gt>mount> command, but it
+allows you to set both the mount options and the vfstype
+as for the L<mount(8)> I<-o> and I<-t> flags.
+
 =item @devices = $h->mounts ();
 
 This returns the list of currently mounted filesystems.  It returns
@@ -676,6 +743,21 @@ must make sure it remains valid for the lifetime of the handle.
 
 Setting C<path> to C<NULL> restores the default path.
 
+=item $h->set_qemu ($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<LIBGUESTFS_QEMU>
+environment variable.
+
+The string C<qemu> is stashed in the libguestfs handle, so the caller
+must make sure it remains valid for the lifetime of the handle.
+
+Setting C<qemu> to C<NULL> restores the default qemu binary.
+
 =item $h->set_ready ();
 
 This sets the state to C<READY>.  This is only used when implementing
@@ -737,6 +819,34 @@ underlying disk image.
 You should always call this if you have modified a disk image, before
 closing the handle.
 
+=item $h->tar_in ($tarfile, $directory);
+
+This command uploads and unpacks local file C<tarfile> (an
+I<uncompressed> tar file) into C<directory>.
+
+To upload a compressed tarball, use C<$h-E<gt>tgz_in>.
+
+=item $h->tar_out ($directory, $tarfile);
+
+This command packs the contents of C<directory> and downloads
+it to local file C<tarfile>.
+
+To download a compressed tarball, use C<$h-E<gt>tgz_out>.
+
+=item $h->tgz_in ($tarball, $directory);
+
+This command uploads and unpacks local file C<tarball> (a
+I<gzip compressed> tar file) into C<directory>.
+
+To upload an uncompressed tarball, use C<$h-E<gt>tar_in>.
+
+=item $h->tgz_out ($directory, $tarball);
+
+This command packs the contents of C<directory> and downloads
+it to local file C<tarball>.
+
+To download an uncompressed tarball, use C<$h-E<gt>tar_out>.
+
 =item $h->touch ($path);
 
 Touch acts like the L<touch(1)> command.  It can be used to