[Libguestfs] [common PATCH v2 1/1] options: add '--blocksize' option for C-based tools

Eric Blake eblake at redhat.com
Wed Feb 12 01:35:28 UTC 2020


On 2/11/20 6:54 PM, Mykola Ivanets wrote:
> From: Nikolay Ivanets <stenavin at gmail.com>
> 
> This patch adds '--blocksize' command line option parsing and handling
> for guestfish and other C-based tools which share the same code from
> this sub-module.
> 
> '--blocksize' will be a common for almost all libguestfs-based tools and
> thus parameter description will be repeated all the time.  Let's move
> it into blocksize-option.pod and include everywhere we need.
> ---

> +++ b/options/blocksize-option.pod
> @@ -0,0 +1,11 @@
> +=item B<--blocksize=512>
> +
> +=item B<--blocksize=4096>
> +
> +=item B<--blocksize>
> +
> +This parameter sets the sector size of the disk image.  It affects all
> +explicitly added subsequent disks after this parameter.  Using
> +I<--blocksize> with no argument switches disk sector size to the

switches the disk sector

> +default value which usually 512 bytes.  See also

which is usually

> +L<guestfs(3)/guestfs_add_drive_opts>.
> diff --git a/options/options.c b/options/options.c
> index fe63da9..63221ea 100644
> --- a/options/options.c


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the Libguestfs mailing list