qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: Yaniv Kamay <ykamay@redhat.com>,
	aliguori@us.ibm.com, Dor Laor <dlaor@redhat.com>,
	avi@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/3] create qemu_file_set_error
Date: Tue, 31 Mar 2009 16:31:35 -0400	[thread overview]
Message-ID: <1238531496-4285-3-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1238531496-4285-2-git-send-email-glommer@redhat.com>

This is mainly for consistency, since we don't want
anything outside of savevm setting it explicitly. There
are current no users of that in qemu tree, but there
are potential candidates on kvm-userspace. And avi
is a nice guy, let's be nice with him.

Based on a patch by Yaniv Kamay

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Yaniv Kamay <ykamay@redhat.com>
CC: Dor Laor <dlaor@redhat.com>
---
 hw/hw.h  |    1 +
 savevm.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/hw.h b/hw/hw.h
index eab7bb4..e9628d4 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -67,6 +67,7 @@ unsigned int qemu_get_be32(QEMUFile *f);
 uint64_t qemu_get_be64(QEMUFile *f);
 int qemu_file_rate_limit(QEMUFile *f);
 int qemu_file_has_error(QEMUFile *f);
+void qemu_file_set_error(QEMUFile *f);
 
 /* Try to send any outstanding data.  This function is useful when output is
  * halted due to rate limiting or EAGAIN errors occur as it can be used to
diff --git a/savevm.c b/savevm.c
index ce12628..9f81d07 100644
--- a/savevm.c
+++ b/savevm.c
@@ -370,6 +370,11 @@ int qemu_file_has_error(QEMUFile *f)
     return f->has_error;
 }
 
+void qemu_file_set_error(QEMUFile *f)
+{
+    f->has_error = 1;
+}
+
 void qemu_fflush(QEMUFile *f)
 {
     if (!f->put_buffer)
-- 
1.5.6.6

  reply	other threads:[~2009-03-31 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 20:31 [Qemu-devel] [PATCH v2 0/3] Migration fixes Glauber Costa
2009-03-31 20:31 ` [Qemu-devel] [PATCH v2 1/3] stop dirty tracking just at the end of migration Glauber Costa
2009-03-31 20:31   ` Glauber Costa [this message]
2009-03-31 20:31     ` [Qemu-devel] [PATCH v2 3/3] propagate error on failed completion Glauber Costa
2009-04-05 19:30   ` [Qemu-devel] [PATCH v2 1/3] stop dirty tracking just at the end of migration Anthony Liguori
2009-04-05 19:33   ` Anthony Liguori

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=1238531496-4285-3-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ykamay@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).