[Libguestfs] [common PATCH] options: add '--blocksize' option for C-based tools
Richard W.M. Jones
rjones at redhat.com
Thu Feb 13 09:42:38 UTC 2020
On Tue, Feb 11, 2020 at 11:41:20PM +0200, Mykola Ivanets wrote:
> diff --git a/options/options.h b/options/options.h
> index 9b78302..9f3a1e7 100644
> --- a/options/options.h
> +++ b/options/options.h
> @@ -65,6 +65,7 @@ struct drv {
> const char *format; /* format (NULL == autodetect) */
> const char *cachemode;/* cachemode (NULL == default) */
> const char *discard; /* discard (NULL == disable) */
> + int blocksize; /* blocksize (0 == default) */
> } a;
> struct {
> char *path; /* disk path */
> @@ -74,6 +75,7 @@ struct drv {
> char *password; /* password - can be NULL */
> const char *format; /* format (NULL == autodetect) */
> const char *orig_uri; /* original URI (for error messages etc.) */
> + int blocksize; /* blocksize (0 == default) */
Trailing whitespace on this line.
> -#define OPTION_c \
> +#define OPTION_c \
> libvirt_uri = optarg
>
> -#define OPTION_d \
> +#define OPTION_d \
> option_d (optarg, &drvs)
>
> -#define OPTION_D \
> +#define OPTION_D \
> option_d (optarg, &drvs2)
>
> -#define OPTION_format \
> - do { \
> - if (!optarg || STREQ (optarg, "")) \
> - format = NULL; \
> - else \
> - format = optarg; \
> - format_consumed = false; \
> +#define OPTION_format \
> + do { \
> + if (!optarg || STREQ (optarg, "")) \
> + format = NULL; \
> + else \
> + format = optarg; \
> + format_consumed = false; \
> } while (0)
There are loads of whitespace-change-only hunks in this patch. Are
they necessary?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
More information about the Libguestfs
mailing list