From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Cole Robinson <crobinso@redhat.com>
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] hmp: delvm: use hmp_handle_error
Date: Wed, 1 May 2019 10:40:51 +0100 [thread overview]
Message-ID: <20190501094049.GA10995@work-vm> (raw)
In-Reply-To: <984634226fa14316641f31f84e7dd0bb770bd94c.1556141033.git.crobinso@redhat.com>
* Cole Robinson (crobinso@redhat.com) wrote:
> This gives us the consistent 'Error:' prefix added in 66363e9a43f,
> which helps users like libvirt who still need to scrape hmp error
> messages to detect failure.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
Queued
> ---
> v2:
> Drop now redundant "Error while" string prefix
>
> hmp.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hmp.c b/hmp.c
> index 4bb3af748e..56a3ed7375 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1480,10 +1480,11 @@ void hmp_delvm(Monitor *mon, const QDict *qdict)
> const char *name = qdict_get_str(qdict, "name");
>
> if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
> - error_reportf_err(err,
> - "Error while deleting snapshot on device '%s': ",
> - bdrv_get_device_name(bs));
> + error_prepend(&err,
> + "deleting snapshot on device '%s': ",
> + bdrv_get_device_name(bs));
> }
> + hmp_handle_error(mon, &err);
> }
>
> void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
> --
> 2.21.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Cole Robinson <crobinso@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] hmp: delvm: use hmp_handle_error
Date: Wed, 1 May 2019 10:40:51 +0100 [thread overview]
Message-ID: <20190501094049.GA10995@work-vm> (raw)
Message-ID: <20190501094051.2NxUHJgxH3Q8BVcmUlRPdEWyc5OQ8wJbWhoZblrw49A@z> (raw)
In-Reply-To: <984634226fa14316641f31f84e7dd0bb770bd94c.1556141033.git.crobinso@redhat.com>
* Cole Robinson (crobinso@redhat.com) wrote:
> This gives us the consistent 'Error:' prefix added in 66363e9a43f,
> which helps users like libvirt who still need to scrape hmp error
> messages to detect failure.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
Queued
> ---
> v2:
> Drop now redundant "Error while" string prefix
>
> hmp.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hmp.c b/hmp.c
> index 4bb3af748e..56a3ed7375 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1480,10 +1480,11 @@ void hmp_delvm(Monitor *mon, const QDict *qdict)
> const char *name = qdict_get_str(qdict, "name");
>
> if (bdrv_all_delete_snapshot(name, &bs, &err) < 0) {
> - error_reportf_err(err,
> - "Error while deleting snapshot on device '%s': ",
> - bdrv_get_device_name(bs));
> + error_prepend(&err,
> + "deleting snapshot on device '%s': ",
> + bdrv_get_device_name(bs));
> }
> + hmp_handle_error(mon, &err);
> }
>
> void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
> --
> 2.21.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-05-01 9:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-24 21:49 [Qemu-devel] [PATCH v2] hmp: delvm: use hmp_handle_error Cole Robinson
2019-04-24 21:49 ` Cole Robinson
2019-05-01 9:40 ` Dr. David Alan Gilbert [this message]
2019-05-01 9:40 ` Dr. David Alan Gilbert
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=20190501094049.GA10995@work-vm \
--to=dgilbert@redhat.com \
--cc=crobinso@redhat.com \
--cc=eblake@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.