From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>
Subject: [PATCH 0/2] migration: Only pass negative values to qemu_file_set_error()
Date: Thu, 6 Jul 2023 16:51:59 -0300 [thread overview]
Message-ID: <20230706195201.18595-1-farosas@suse.de> (raw)
qemu_file_set_error() sets f->last_error, which is later used by
functions in qemu-file.c to return the error to callers.
The following functions expect f->last_error to be -errno:
qemu_file_get_error_obj()
qemu_file_get_error()
qemu_fclose()
Make sure qemu_file_set_error() always receives a negative number and
document the assumption.
Fabiano Rosas (2):
target/arm: Return negative value on power state migration error
migration: Make it clear that qemu_file_set_error() needs a negative
value
migration/qemu-file.c | 2 ++
migration/savevm.c | 6 +++---
target/arm/machine.c | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
--
2.35.3
next reply other threads:[~2023-07-06 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-06 19:51 Fabiano Rosas [this message]
2023-07-06 19:52 ` [PATCH 1/2] target/arm: Return negative value on power state migration error Fabiano Rosas
2023-07-06 19:52 ` [PATCH 2/2] migration: Make it clear that qemu_file_set_error() needs a negative value Fabiano Rosas
2023-07-13 11:23 ` Peter Maydell
2023-07-13 13:18 ` Fabiano Rosas
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=20230706195201.18595-1-farosas@suse.de \
--to=farosas@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).