X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=guestfs-actions.pod;h=6f33d80e5b261bd3319e2ffcaa7a10986c65644b;hp=c187540079505a81a62d0edd9c5a69059680c985;hb=ca49c50e06834bbc68e21630a5552c57494f2b53;hpb=45d78361d791f4a752fca9472b81bdc75f9f92a4 diff --git a/guestfs-actions.pod b/guestfs-actions.pod index c187540..6f33d80 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -713,6 +713,18 @@ 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); @@ -1014,6 +1026,18 @@ 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); @@ -1196,6 +1220,16 @@ to remove those first. This function returns 0 on success or -1 on error. +=head2 guestfs_pvresize + + int guestfs_pvresize (guestfs_h *handle, + const char *device); + +This resizes (expands or shrinks) an existing LVM physical +volume to match the new size of the underlying device. + +This function returns 0 on success or -1 on error. + =head2 guestfs_pvs char **guestfs_pvs (guestfs_h *handle); @@ -1243,6 +1277,16 @@ This function returns a NULL-terminated array of strings (like L), or NULL if there was an error. I. +=head2 guestfs_resize2fs + + int guestfs_resize2fs (guestfs_h *handle, + const char *device); + +This resizes an ext2 or ext3 filesystem to match the size of +the underlying device. + +This function returns 0 on success or -1 on error. + =head2 guestfs_rm int guestfs_rm (guestfs_h *handle, @@ -1272,6 +1316,22 @@ Remove the single directory C. This function returns 0 on success or -1 on error. +=head2 guestfs_set_append + + int guestfs_set_append (guestfs_h *handle, + const char *append); + +This function is used to add additional options to the +guest kernel command line. + +The default is C unless overridden by setting +C environment variable. + +Setting C to C means I additional options +are passed (libguestfs always adds a few of its own). + +This function returns 0 on success or -1 on error. + =head2 guestfs_set_autosync int guestfs_set_autosync (guestfs_h *handle, @@ -1339,9 +1399,6 @@ Set the path that libguestfs searches for kernel and initrd.img. The default is C<$libdir/guestfs> unless overridden by setting 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 path. This function returns 0 on success or -1 on error. @@ -1359,9 +1416,6 @@ 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. @@ -1418,11 +1472,75 @@ To create a single partition occupying the whole disk, you would pass C as a single element list, when the single element being the string C<,> (comma). +See also: C, C + This function returns 0 on success or -1 on error. B. +=head2 guestfs_sfdisk_N + + int guestfs_sfdisk_N (guestfs_h *handle, + const char *device, + int n, + int cyls, + int heads, + int sectors, + const char *line); + +This runs L option to modify just the single +partition C (note: C counts from 1). + +For other parameters, see C. You should usually +pass C<0> for the cyls/heads/sectors parameters. + +This function returns 0 on success or -1 on error. + +B. + +=head2 guestfs_sfdisk_disk_geometry + + char *guestfs_sfdisk_disk_geometry (guestfs_h *handle, + const char *device); + +This displays the disk geometry of C read from the +partition table. Especially in the case where the underlying +block device has been resized, this can be different from the +kernel's idea of the geometry (see C). + +The result is in human-readable format, and not designed to +be parsed. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_sfdisk_kernel_geometry + + char *guestfs_sfdisk_kernel_geometry (guestfs_h *handle, + const char *device); + +This displays the kernel's idea of the geometry of C. + +The result is in human-readable format, and not designed to +be parsed. + +This function returns a string, or NULL on error. +I. + +=head2 guestfs_sfdisk_l + + char *guestfs_sfdisk_l (guestfs_h *handle, + const char *device); + +This displays the partition table on C, in the +human-readable output of the L command. It is +not intended to be parsed. + +This function returns a string, or NULL on error. +I. + =head2 guestfs_stat struct guestfs_stat *guestfs_stat (guestfs_h *handle, @@ -1623,6 +1741,40 @@ See also C. This function returns 0 on success or -1 on error. +=head2 guestfs_vg_activate + + int guestfs_vg_activate (guestfs_h *handle, + int activate, + char * const* const volgroups); + +This command activates or (if C is false) deactivates +all logical volumes in the listed volume groups C. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + +Note that if C is an empty list then B volume groups +are activated or deactivated. + +This function returns 0 on success or -1 on error. + +=head2 guestfs_vg_activate_all + + int guestfs_vg_activate_all (guestfs_h *handle, + int activate); + +This command activates or (if C is false) deactivates +all logical volumes in all volume groups. +If activated, then they are made known to the +kernel, ie. they appear as C devices. If deactivated, +then those devices disappear. + +This command is the same as running C + +This function returns 0 on success or -1 on error. + =head2 guestfs_vgcreate int guestfs_vgcreate (guestfs_h *handle, @@ -1725,3 +1877,21 @@ any partition tables, filesystem superblocks and so on. This function returns 0 on success or -1 on error. +=head2 guestfs_zerofree + + int guestfs_zerofree (guestfs_h *handle, + const char *device); + +This runs the I program on C. This program +claims to zero unused inodes and disk blocks on an ext2/3 +filesystem, thus making it possible to compress the filesystem +more effectively. + +You should B run this program if the filesystem is +mounted. + +It is possible that using this program can damage the filesystem +or data on the filesystem. + +This function returns 0 on success or -1 on error. +