diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-15 17:48:54 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-15 17:48:54 +0100 |
commit | b348eacbc4d84337856cf7cca518d61c63e92631 (patch) | |
tree | ad6cefaf75e05e6a4da9c9b18061222a3ba98727 /guestfs-actions.pod | |
parent | e038597ebd1e43c83a8ddde21c4f1898eb7a9a98 (diff) | |
download | libguestfs-b348eacbc4d84337856cf7cca518d61c63e92631.tar.gz libguestfs-b348eacbc4d84337856cf7cca518d61c63e92631.tar.xz libguestfs-b348eacbc4d84337856cf7cca518d61c63e92631.zip |
Generated code for blockdev_* calls, RInt64, enhanced tests.
Diffstat (limited to 'guestfs-actions.pod')
-rw-r--r-- | guestfs-actions.pod | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/guestfs-actions.pod b/guestfs-actions.pod index 889363a5..cb2415ca 100644 --- a/guestfs-actions.pod +++ b/guestfs-actions.pod @@ -239,6 +239,136 @@ Set the value associated with C<path> to C<value>. 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<device>. + +This uses the L<blockdev(8)> 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<size in blocks> and +I<filesystem block size>). + +This uses the L<blockdev(8)> 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<blockdev(8)> 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<guestfs_blockdev_getsz>. + +This uses the L<blockdev(8)> 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<guestfs_blockdev_getsz> +for that). + +This uses the L<blockdev(8)> 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<guestfs_blockdev_getss> for the real sector size of +the device, and C<guestfs_blockdev_getsize64> for the more +useful I<size in bytes>. + +This uses the L<blockdev(8)> 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<device>. + +This uses the L<blockdev(8)> 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<size in blocks> and +I<filesystem block size>). + +This uses the L<blockdev(8)> 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<device> to read-only. + +This uses the L<blockdev(8)> 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<device> to read-write. + +This uses the L<blockdev(8)> command. + +This function returns 0 on success or -1 on error. + =head2 guestfs_cat char *guestfs_cat (guestfs_h *handle, |