qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: michael.roth@amd.com, pkrempa@redhat.com, armbru@redhat.com
Subject: Re: [PATCH] qga: return a more explicit error on why a command is disabled
Date: Tue, 16 Feb 2021 09:14:02 -0600	[thread overview]
Message-ID: <ff150e0f-7559-c966-4b1c-ec32305a0286@redhat.com> (raw)
In-Reply-To: <20210216133837.2347190-1-marcandre.lureau@redhat.com>

On 2/16/21 7:38 AM, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> qmp_disable_command() now takes an optional error string to return a
> more explicit error message.
> 
> Fixes:
> https://bugzilla.redhat.com/show_bug.cgi?id=1928806
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---

> +++ b/qapi/qmp-dispatch.c
> @@ -157,7 +157,7 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
>      }
>      if (!cmd->enabled) {
>          error_set(&err, ERROR_CLASS_COMMAND_NOT_FOUND,
> -                  "The command %s has been disabled for this instance",
> +                  cmd->err_msg ?: "The command %s has been disabled for this instance",

No trailing dot (good),...

> +++ b/qga/main.c
> @@ -375,7 +375,7 @@ static void ga_disable_non_whitelisted(const QmpCommand *cmd, void *opaque)
>      }
>      if (!whitelisted) {
>          g_debug("disabling command: %s", name);
> -        qmp_disable_command(&ga_commands, name);
> +        qmp_disable_command(&ga_commands, name, "The command was disabled after fsfreeze.");

...while this introduces one (not good).

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



      parent reply	other threads:[~2021-02-16 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 13:38 [PATCH] qga: return a more explicit error on why a command is disabled marcandre.lureau
2021-02-16 13:46 ` no-reply
2021-02-16 14:30 ` Peter Krempa
2021-02-16 14:58   ` Marc-André Lureau
2021-02-16 15:14 ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff150e0f-7559-c966-4b1c-ec32305a0286@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).