X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=guestfs-actions.pod;h=5f66318c6df33d39b1df4a0027640344a4757eaf;hb=f20854ec61eef1aea313920f0cf193a78c1a9219;hp=039608d5fc1e52713d37e351835b8fede2bf71c6;hpb=e492608f2f3809a824cb70ee03ff305964b69dd7;p=libguestfs.git diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 039608d..5f66318 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -30,7 +30,8 @@ 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,cache=off>. +This is equivalent to the qemu parameter +C<-drive file=filename,cache=off,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -54,7 +55,7 @@ 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>. +C<-drive file=filename,snapshot=on,if=virtio>. Note that this call checks for the existence of C. This stops you from specifying other types of drive which are supported @@ -885,6 +886,22 @@ 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); @@ -1012,6 +1029,25 @@ 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); @@ -1300,6 +1336,18 @@ See also: L This function returns a string, or NULL on error. I. +=head2 guestfs_mkfifo + + int guestfs_mkfifo (guestfs_h *handle, + int mode, + const char *path); + +This call creates a FIFO (named pipe) called C with +mode C. It is just a convenient wrapper around +C. + +This function returns 0 on success or -1 on error. + =head2 guestfs_mkfs int guestfs_mkfs (guestfs_h *handle, @@ -1312,6 +1360,81 @@ example C. This function returns 0 on success or -1 on error. +=head2 guestfs_mknod + + int guestfs_mknod (guestfs_h *handle, + int mode, + int devmajor, + int devminor, + const char *path); + +This call creates block or character special devices, or +named pipes (FIFOs). + +The C parameter should be the mode, using the standard +constants. C and C are the +device major and minor numbers, only used when creating block +and character special devices. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mknod_b + + int guestfs_mknod_b (guestfs_h *handle, + int mode, + int devmajor, + int devminor, + const char *path); + +This call creates a block device node called C with +mode C and device major/minor C and C. +It is just a convenient wrapper around C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mknod_c + + int guestfs_mknod_c (guestfs_h *handle, + int mode, + int devmajor, + int devminor, + const char *path); + +This call creates a char device node called C with +mode C and device major/minor C and C. +It is just a convenient wrapper around C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mkswap + + int guestfs_mkswap (guestfs_h *handle, + const char *device); + +Create a swap partition on C. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_mkswap_L + + int guestfs_mkswap_L (guestfs_h *handle, + const char *label, + const char *device); + +Create a swap partition on C with label C