From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v3 13/14] dump: Drop pointless error_is_set(), DumpState member errp
Date: Fri, 2 May 2014 13:26:41 +0200 [thread overview]
Message-ID: <1399030002-27222-14-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1399030002-27222-1-git-send-email-armbru@redhat.com>
In qmp_dump_guest_memory(), the error must be clear on entry, and we
always bail out after setting it, directly or via dump_init().
Therefore, both error_is_set() are always false. Drop them.
DumpState member errp is now write-only. Drop it, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
dump.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/dump.c b/dump.c
index 14b3d1d..e56b7cf 100644
--- a/dump.c
+++ b/dump.c
@@ -86,7 +86,6 @@ typedef struct DumpState {
bool has_filter;
int64_t begin;
int64_t length;
- Error **errp;
uint8_t *note_buf; /* buffer for notes */
size_t note_buf_offset; /* the writing place in note_buf */
@@ -1570,7 +1569,6 @@ static int dump_init(DumpState *s, int fd, bool has_format,
nr_cpus++;
}
- s->errp = errp;
s->fd = fd;
s->has_filter = has_filter;
s->begin = begin;
@@ -1780,11 +1778,11 @@ void qmp_dump_guest_memory(bool paging, const char *file, bool has_begin,
}
if (has_format && format != DUMP_GUEST_MEMORY_FORMAT_ELF) {
- if (create_kdump_vmcore(s) < 0 && !error_is_set(s->errp)) {
+ if (create_kdump_vmcore(s) < 0) {
error_set(errp, QERR_IO_ERROR);
}
} else {
- if (create_vmcore(s) < 0 && !error_is_set(s->errp)) {
+ if (create_vmcore(s) < 0) {
error_set(errp, QERR_IO_ERROR);
}
}
--
1.8.1.4
next prev parent reply other threads:[~2014-05-02 11:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 11:26 [Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 01/14] qmp hmp: Consistently name Error * objects err, and not errp Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 02/14] qga: Consistently name Error ** objects errp, and not err Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 03/14] qmp: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 04/14] error: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 05/14] qga: Use return values instead of error_is_set(errp) Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 06/14] hmp: Guard against misuse of hmp_handle_error() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 07/14] qapi: Drop redundant, unclean error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 08/14] tests/qapi-schema: Drop superfluous error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 09/14] qapi: Clean up fragile use of error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 10/14] qga: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 11/14] qga: Drop superfluous error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 12/14] qemu-option: Clean up fragile use of error_is_set() Markus Armbruster
2014-05-02 11:26 ` Markus Armbruster [this message]
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 14/14] qmp: Don't use error_is_set() to suppress additional errors Markus Armbruster
2014-05-02 12:34 ` Eric Blake
2014-05-07 6:08 ` Markus Armbruster
2014-05-07 14:08 ` Luiz Capitulino
2014-05-07 15:54 ` Markus Armbruster
2014-05-02 12:32 ` [Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set() Eric Blake
2014-05-07 14:30 ` Luiz Capitulino
2014-05-07 16:00 ` Markus Armbruster
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=1399030002-27222-14-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@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).