qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live b


From: Eduardo Habkost
Subject: Re: [Qemu-block] [PATCH v2 2/3] block-jobs: Optionally unregister live block operations
Date: Wed, 30 Aug 2017 14:24:13 -0300
User-agent: Mutt/1.8.3 (2017-05-23)

On Wed, Aug 30, 2017 at 01:01:41PM -0400, Jeff Cody wrote:
> From: Jeffrey Cody <address@hidden>
> 
> If configured without live block operations enabled, unregister the
> live block operation commands.
> 
> Signed-off-by: Jeff Cody <address@hidden>
> ---
>  monitor.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/monitor.c b/monitor.c
> index e0f8801..de0a70e 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -998,6 +998,22 @@ static void qmp_unregister_commands_hack(void)
>      && !defined(TARGET_S390X)
>      qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
>  #endif
> +#ifndef CONFIG_LIVE_BLOCK_OPS
> +    qmp_unregister_command(&qmp_commands, "block-stream");
> +    qmp_unregister_command(&qmp_commands, "block-commit");
> +    qmp_unregister_command(&qmp_commands, "drive-mirror");
> +    qmp_unregister_command(&qmp_commands, "blockdev-mirror");
> +    qmp_unregister_command(&qmp_commands, "drive-backup");
> +    qmp_unregister_command(&qmp_commands, "blockdev-backup");
> +    qmp_unregister_command(&qmp_commands, "blockdev-snapshot");
> +    qmp_unregister_command(&qmp_commands, "blockdev-snapshot-sync");
> +    qmp_unregister_command(&qmp_commands, "block-job-set-speed");
> +    qmp_unregister_command(&qmp_commands, "block-job-cancel");
> +    qmp_unregister_command(&qmp_commands, "block-job-pause");
> +    qmp_unregister_command(&qmp_commands, "block-job-resume");
> +    qmp_unregister_command(&qmp_commands, "block-job-complete");
> +    qmp_unregister_command(&qmp_commands, "query-block-jobs");
> +#endif

I suggest using the new mechanisms added by:

  [PATCH 00/26] qapi: add #if pre-processor conditions to generated code

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]