X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfs-actions.pod;h=50eba95a2685306247e633e97dd00d74eabcc2de;hp=889363a5b1888c0a1495251c045670d6f657e3fc;hb=0884d8bbae6d76a603ec1385ada2938f88981c5c;hpb=ad5abc8d367c9c410051062cae066b1b141b4c76 diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 889363a..50eba95 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -7,6 +7,11 @@ This function adds a virtual CD-ROM disk image to the guest. This is equivalent to the qemu parameter C<-cdrom filename>. +Note that this call checks for the existence of C. This +stops you from specifying other types of drive which are supported +by qemu such as C and C URLs. To specify those, use +the general C call instead. + This function returns 0 on success or -1 on error. =head2 guestfs_add_drive @@ -25,7 +30,36 @@ for whatever operations you want to perform (ie. read access if you just want to read the image or write access if you want to modify the image). -This is equivalent to the qemu parameter C<-drive file=filename>. +This is equivalent to the qemu parameter C<-drive file=filename,cache=off>. + +Note that this call checks for the existence of C. This +stops you from specifying other types of drive which are supported +by qemu such as C and C URLs. To specify those, use +the general C call instead. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_add_drive_ro + + int guestfs_add_drive_ro (guestfs_h *handle, + const char *filename); + +This adds a drive in snapshot mode, making it effectively +read-only. + +Note that writes to the device are allowed, and will be seen for +the duration of the guestfs handle, but they are written +to a temporary file which is discarded as soon as the guestfs +handle is closed. We don't currently have any method to enable +changes to be committed, although qemu can support this. + +This is equivalent to the qemu parameter +C<-drive file=filename,snapshot=on>. + +Note that this call checks for the existence of C. This +stops you from specifying other types of drive which are supported +by qemu such as C and C URLs. To specify those, use +the general C call instead. This function returns 0 on success or -1 on error. @@ -239,6 +273,136 @@ Set the value associated with C to C. This function returns 0 on success or -1 on error. +=head2 guestfs_blockdev_flushbufs + + int guestfs_blockdev_flushbufs (guestfs_h *handle, + const char *device); + +This tells the kernel to flush internal buffers associated +with C. + +This uses the L command. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_blockdev_getbsz + + int guestfs_blockdev_getbsz (guestfs_h *handle, + const char *device); + +This returns the block size of a device. + +(Note this is different from both I and +I). + +This uses the L command. + +On error this function returns -1. + +=head2 guestfs_blockdev_getro + + int guestfs_blockdev_getro (guestfs_h *handle, + const char *device); + +Returns a boolean indicating if the block device is read-only +(true if read-only, false if not). + +This uses the L command. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_blockdev_getsize64 + + int64_t guestfs_blockdev_getsize64 (guestfs_h *handle, + const char *device); + +This returns the size of the device in bytes. + +See also C. + +This uses the L command. + +On error this function returns -1. + +=head2 guestfs_blockdev_getss + + int guestfs_blockdev_getss (guestfs_h *handle, + const char *device); + +This returns the size of sectors on a block device. +Usually 512, but can be larger for modern devices. + +(Note, this is not the size in sectors, use C +for that). + +This uses the L command. + +On error this function returns -1. + +=head2 guestfs_blockdev_getsz + + int64_t guestfs_blockdev_getsz (guestfs_h *handle, + const char *device); + +This returns the size of the device in units of 512-byte sectors +(even if the sectorsize isn't 512 bytes ... weird). + +See also C for the real sector size of +the device, and C for the more +useful I. + +This uses the L command. + +On error this function returns -1. + +=head2 guestfs_blockdev_rereadpt + + int guestfs_blockdev_rereadpt (guestfs_h *handle, + const char *device); + +Reread the partition table on C. + +This uses the L command. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_blockdev_setbsz + + int guestfs_blockdev_setbsz (guestfs_h *handle, + const char *device, + int blocksize); + +This sets the block size of a device. + +(Note this is different from both I and +I). + +This uses the L command. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_blockdev_setro + + int guestfs_blockdev_setro (guestfs_h *handle, + const char *device); + +Sets the block device named C to read-only. + +This uses the L command. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_blockdev_setrw + + int guestfs_blockdev_setrw (guestfs_h *handle, + const char *device); + +Sets the block device named C to read-write. + +This uses the L command. + +This function returns 0 on success or -1 on error. + =head2 guestfs_cat char *guestfs_cat (guestfs_h *handle, @@ -248,7 +412,7 @@ Return the contents of the file named C. Note that this function cannot correctly handle binary files (specifically, files containing C<\0> character which is treated -as end of string). For those you need to use the C +as end of string). For those you need to use the C function which has a more complex interface. This function returns a string, or NULL on error. @@ -258,6 +422,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, @@ -297,7 +511,16 @@ or compatible processor architecture). The single parameter is an argv-style list of arguments. The first element is the name of the program to run. Subsequent elements are parameters. The list must be -non-empty (ie. must contain a program name). +non-empty (ie. must contain a program name). Note that +the command runs directly, and is I invoked via +the shell (see C). + +The return value is anything printed to I by +the command. + +If the command returns a non-zero exit status, then +this function returns an error message. The error message +string is the content of I from the command. The C<$PATH> environment variable will contain at least C and C. If you require a program from @@ -313,6 +536,10 @@ locations. This function returns a string, or NULL on error. I. +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_command_lines char **guestfs_command_lines (guestfs_h *handle, @@ -321,10 +548,16 @@ I. This is the same as C, but splits the result into a list of lines. +See also: C + This function returns a NULL-terminated array of strings (like L), or NULL if there was an error. I. +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_config int guestfs_config (guestfs_h *handle, @@ -342,171 +575,631 @@ C can be NULL. This function returns 0 on success or -1 on error. -=head2 guestfs_exists +=head2 guestfs_cp - int guestfs_exists (guestfs_h *handle, - const char *path); + int guestfs_cp (guestfs_h *handle, + const char *src, + const char *dest); -This returns C if and only if there is a file, directory -(or anything) with the given C name. +This copies a file from C to C where C is +either a destination filename or destination directory. -See also C, C, C. +This function returns 0 on success or -1 on error. -This function returns a C truth value on success or -1 on error. +=head2 guestfs_cp_a -=head2 guestfs_file + int guestfs_cp_a (guestfs_h *handle, + const char *src, + const char *dest); - char *guestfs_file (guestfs_h *handle, - const char *path); +This copies a file or directory from C to C +recursively using the C command. -This call uses the standard L command to determine -the type or contents of the file. This also works on devices, -for example to find out whether a partition contains a filesystem. +This function returns 0 on success or -1 on error. -The exact command which runs is C. Note in -particular that the filename is not prepended to the output -(the C<-b> option). +=head2 guestfs_debug + + char *guestfs_debug (guestfs_h *handle, + const char *subcmd, + char * const* const extraargs); + +The C command exposes some internals of +C (the guestfs daemon) that runs inside the +qemu subprocess. + +There is no comprehensive help for this command. You have +to look at the file C in the libguestfs source +to find out what you can do. This function returns a string, or NULL on error. I. -=head2 guestfs_get_autosync +=head2 guestfs_df - int guestfs_get_autosync (guestfs_h *handle); + char *guestfs_df (guestfs_h *handle); -Get the autosync flag. +This command runs the C command to report disk space used. -This function returns a C truth value on success or -1 on error. +This command is mostly useful for interactive sessions. It +is I intended that you try to parse the output string. +Use C from programs. -=head2 guestfs_get_path +This function returns a string, or NULL on error. +I. - const char *guestfs_get_path (guestfs_h *handle); +=head2 guestfs_df_h -Return the current search path. + char *guestfs_df_h (guestfs_h *handle); -This is always non-NULL. If it wasn't set already, then this will -return the default path. +This command runs the C command to report disk space used +in human-readable format. -This function returns a string, or NULL on error. -The string is owned by the guest handle and must I be freed. +This command is mostly useful for interactive sessions. It +is I intended that you try to parse the output string. +Use C from programs. -=head2 guestfs_get_verbose +This function returns a string, or NULL on error. +I. - int guestfs_get_verbose (guestfs_h *handle); +=head2 guestfs_dmesg -This returns the verbose messages flag. + char *guestfs_dmesg (guestfs_h *handle); -This function returns a C truth value on success or -1 on error. +This returns the kernel messages (C output) from +the guest kernel. This is sometimes useful for extended +debugging of problems. -=head2 guestfs_is_dir +Another way to get the same information is to enable +verbose messages with C or by setting +the environment variable C before +running the program. - int guestfs_is_dir (guestfs_h *handle, - const char *path); +This function returns a string, or NULL on error. +I. -This returns C if and only if there is a directory -with the given C name. Note that it returns false for -other objects like files. +=head2 guestfs_download -See also C. + int guestfs_download (guestfs_h *handle, + const char *remotefilename, + const char *filename); -This function returns a C truth value on success or -1 on error. +Download file C and save it as C +on the local machine. -=head2 guestfs_is_file +C can also be a named pipe. - int guestfs_is_file (guestfs_h *handle, - const char *path); +See also C, C. -This returns C if and only if there is a file -with the given C name. Note that it returns false for -other objects like directories. +This function returns 0 on success or -1 on error. -See also C. +=head2 guestfs_drop_caches -This function returns a C truth value on success or -1 on error. + int guestfs_drop_caches (guestfs_h *handle, + int whattodrop); -=head2 guestfs_kill_subprocess +This instructs the guest kernel to drop its page cache, +and/or dentries and inode caches. The parameter C +tells the kernel what precisely to drop, see +L - int guestfs_kill_subprocess (guestfs_h *handle); +Setting C to 3 should drop everything. -This kills the qemu subprocess. You should never need to call this. +This automatically calls L before the operation, +so that the maximum guest memory is freed. This function returns 0 on success or -1 on error. -=head2 guestfs_launch +=head2 guestfs_du - int guestfs_launch (guestfs_h *handle); + int64_t guestfs_du (guestfs_h *handle, + const char *path); -Internally libguestfs is implemented by running a virtual machine -using L. +This command runs the C command to estimate file space +usage for C. -You should call this after configuring the handle -(eg. adding drives) but before performing any actions. +C can be a file or a directory. If C is a directory +then the estimate includes the contents of the directory and all +subdirectories (recursively). -This function returns 0 on success or -1 on error. +The result is the estimated size in I +(ie. units of 1024 bytes). -=head2 guestfs_list_devices +On error this function returns -1. - char **guestfs_list_devices (guestfs_h *handle); +=head2 guestfs_e2fsck_f -List all the block devices. + int guestfs_e2fsck_f (guestfs_h *handle, + const char *device); -The full block device names are returned, eg. C +This runs C, ie. runs the ext2/ext3 +filesystem checker on C, noninteractively (C<-p>), +even if the filesystem appears to be clean (C<-f>). -This function returns a NULL-terminated array of strings -(like L), or NULL if there was an error. -I. +This command is only needed because of C +(q.v.). Normally you should use C. -=head2 guestfs_list_partitions +This function returns 0 on success or -1 on error. - char **guestfs_list_partitions (guestfs_h *handle); +=head2 guestfs_end_busy -List all the partitions detected on all block devices. + int guestfs_end_busy (guestfs_h *handle); -The full partition device names are returned, eg. C +This sets the state to C, or if in C then it leaves the +state as is. This is only used when implementing +actions using the low-level API. -This does not return logical volumes. For that you will need to -call C. +For more information on states, see L. -This function returns a NULL-terminated array of strings -(like L), or NULL if there was an error. -I. +This function returns 0 on success or -1 on error. -=head2 guestfs_ll +=head2 guestfs_equal - char *guestfs_ll (guestfs_h *handle, - const char *directory); + int guestfs_equal (guestfs_h *handle, + const char *file1, + const char *file2); -List the files in C (relative to the root directory, -there is no cwd) in the format of 'ls -la'. +This compares the two files C and C and returns +true if their content is exactly equal, or false otherwise. -This command is mostly useful for interactive sessions. It -is I intended that you try to parse the output string. +The external L program is used for the comparison. -This function returns a string, or NULL on error. -I. +This function returns a C truth value on success or -1 on error. -=head2 guestfs_ls +=head2 guestfs_exists - char **guestfs_ls (guestfs_h *handle, - const char *directory); + int guestfs_exists (guestfs_h *handle, + const char *path); -List the files in C (relative to the root directory, -there is no cwd). The '.' and '..' entries are not returned, but -hidden files are shown. +This returns C if and only if there is a file, directory +(or anything) with the given C name. -This command is mostly useful for interactive sessions. Programs -should probably use C instead. +See also C, C, C. -This function returns a NULL-terminated array of strings -(like L), or NULL if there was an error. -I. +This function returns a C truth value on success or -1 on error. -=head2 guestfs_lstat +=head2 guestfs_file - struct guestfs_stat *guestfs_lstat (guestfs_h *handle, + char *guestfs_file (guestfs_h *handle, const char *path); -Returns file information for the given C. +This call uses the standard L command to determine +the type or contents of the file. This also works on devices, +for example to find out whether a partition contains a filesystem. + +The exact command which runs is C. Note in +particular that the filename is not prepended to the output +(the C<-b> option). + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_find + + char **guestfs_find (guestfs_h *handle, + const char *directory); + +This command lists out all files and directories, recursively, +starting at C. It is essentially equivalent to +running the shell command C but some +post-processing happens on the output, described below. + +This returns a list of strings I. Thus +if the directory structure was: + + /tmp/a + /tmp/b + /tmp/c/d + +then the returned list from C C would be +4 elements: + + a + b + c + c/d + +If C is not a directory, then this command returns +an error. + +The returned list is sorted. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_fsck + + int guestfs_fsck (guestfs_h *handle, + const char *fstype, + const char *device); + +This runs the filesystem checker (fsck) on C which +should have filesystem type C. + +The returned integer is the status. See L for the +list of status codes from C. + +Notes: + +=over 4 + +=item * + +Multiple status codes can be summed together. + +=item * + +A non-zero return code can mean "success", for example if +errors have been corrected on the filesystem. + +=item * + +Checking or repairing NTFS volumes is not supported +(by linux-ntfs). + +=back + +This command is entirely equivalent to running C. + +On error this function returns -1. + +=head2 guestfs_get_append + + const char *guestfs_get_append (guestfs_h *handle); + +Return the additional kernel options which are added to the +guest kernel command line. + +If C then no options are added. + +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_autosync + + int guestfs_get_autosync (guestfs_h *handle); + +Get the autosync flag. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_get_e2label + + char *guestfs_get_e2label (guestfs_h *handle, + const char *device); + +This returns the ext2/3/4 filesystem label of the filesystem on +C. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_get_e2uuid + + char *guestfs_get_e2uuid (guestfs_h *handle, + const char *device); + +This returns the ext2/3/4 filesystem UUID of the filesystem on +C. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_get_memsize + + int guestfs_get_memsize (guestfs_h *handle); + +This gets the memory size in megabytes allocated to the +qemu subprocess. + +If C was not called +on this handle, and if C was not set, +then this returns the compiled-in default value for memsize. + +For more information on the architecture of libguestfs, +see L. + +On error this function returns -1. + +=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. + +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); + +This returns the current state as an opaque integer. This is +only useful for printing debug and internal error messages. + +For more information on states, see L. + +On error this function returns -1. + +=head2 guestfs_get_verbose + + int guestfs_get_verbose (guestfs_h *handle); + +This returns the verbose messages flag. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_glob_expand + + char **guestfs_glob_expand (guestfs_h *handle, + const char *pattern); + +This command searches for all the pathnames matching +C according to the wildcard expansion rules +used by the shell. + +If no paths match, then this returns an empty list +(note: not an error). + +It is just a wrapper around the C L function +with flags C. +See that manual page for more details. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_grub_install + + int guestfs_grub_install (guestfs_h *handle, + const char *root, + const char *device); + +This command installs GRUB (the Grand Unified Bootloader) on +C, with the root directory being C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_head + + char **guestfs_head (guestfs_h *handle, + const char *path); + +This command returns up to the first 10 lines of a file as +a list of strings. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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_head_n + + char **guestfs_head_n (guestfs_h *handle, + int nrlines, + const char *path); + +If the parameter C is a positive number, this returns the first +C lines of the file C. + +If the parameter C is a negative number, this returns lines +from the file C, excluding the last C lines. + +If the parameter C is zero, this returns an empty list. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +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_hexdump + + char *guestfs_hexdump (guestfs_h *handle, + const char *path); + +This runs C on the given C. The result is +the human-readable, canonical hex dump of the file. + +This function returns a string, or NULL on error. +I. + +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_initrd_list + + char **guestfs_initrd_list (guestfs_h *handle, + const char *path); + +This command lists out files contained in an initrd. + +The files are listed without any initial C character. The +files are listed in the order they appear (not necessarily +alphabetical). Directory names are listed as separate items. + +Old Linux kernels (2.4 and earlier) used a compressed ext2 +filesystem as initrd. We I support the newer initramfs +format (compressed cpio files). + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_is_busy + + int guestfs_is_busy (guestfs_h *handle); + +This returns true iff this handle is busy processing a command +(in the C state). + +For more information on states, see L. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_is_config + + int guestfs_is_config (guestfs_h *handle); + +This returns true iff this handle is being configured +(in the C state). + +For more information on states, see L. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_is_dir + + int guestfs_is_dir (guestfs_h *handle, + const char *path); + +This returns C if and only if there is a directory +with the given C name. Note that it returns false for +other objects like files. + +See also C. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_is_file + + int guestfs_is_file (guestfs_h *handle, + const char *path); + +This returns C if and only if there is a file +with the given C name. Note that it returns false for +other objects like directories. + +See also C. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_is_launching + + int guestfs_is_launching (guestfs_h *handle); + +This returns true iff this handle is launching the subprocess +(in the C state). + +For more information on states, see L. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_is_ready + + int guestfs_is_ready (guestfs_h *handle); + +This returns true iff this handle is ready to accept commands +(in the C state). + +For more information on states, see L. + +This function returns a C truth value on success or -1 on error. + +=head2 guestfs_kill_subprocess + + int guestfs_kill_subprocess (guestfs_h *handle); + +This kills the qemu subprocess. You should never need to call this. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_launch + + int guestfs_launch (guestfs_h *handle); + +Internally libguestfs is implemented by running a virtual machine +using L. + +You should call this after configuring the handle +(eg. adding drives) but before performing any actions. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_list_devices + + char **guestfs_list_devices (guestfs_h *handle); + +List all the block devices. + +The full block device names are returned, eg. C + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_list_partitions + + char **guestfs_list_partitions (guestfs_h *handle); + +List all the partitions detected on all block devices. + +The full partition device names are returned, eg. C + +This does not return logical volumes. For that you will need to +call C. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_ll + + char *guestfs_ll (guestfs_h *handle, + const char *directory); + +List the files in C (relative to the root directory, +there is no cwd) in the format of 'ls -la'. + +This command is mostly useful for interactive sessions. It +is I intended that you try to parse the output string. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_ls + + char **guestfs_ls (guestfs_h *handle, + const char *directory); + +List the files in C (relative to the root directory, +there is no cwd). The '.' and '..' entries are not returned, but +hidden files are shown. + +This command is mostly useful for interactive sessions. Programs +should probably use C instead. + +This function returns a NULL-terminated array of strings +(like L), or NULL if there was an error. +I. + +=head2 guestfs_lstat + + struct guestfs_stat *guestfs_lstat (guestfs_h *handle, + const char *path); + +Returns file information for the given C. This is the same as C except that if C is a symbolic link, then the link is stat-ed, not the file it @@ -543,6 +1236,31 @@ This function returns 0 on success or -1 on error. B. +=head2 guestfs_lvremove + + int guestfs_lvremove (guestfs_h *handle, + const char *device); + +Remove an LVM logical volume C, where C is +the path to the LV, such as C. + +You can also remove all LVs in a volume group by specifying +the VG name, C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_lvresize + + int guestfs_lvresize (guestfs_h *handle, + const char *device, + int mbytes); + +This resizes (expands or shrinks) an existing LVM logical +volume to C. When reducing, data in the reduced part +is lost. + +This function returns 0 on success or -1 on error. + =head2 guestfs_lvs char **guestfs_lvs (guestfs_h *handle); @@ -590,6 +1308,45 @@ as necessary. This is like the C shell command. This function returns 0 on success or -1 on error. +=head2 guestfs_mkdtemp + + char *guestfs_mkdtemp (guestfs_h *handle, + const char *template); + +This command creates a temporary directory. The +C