From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqY3S-0004Ou-Jy for qemu-devel@nongnu.org; Sun, 05 Apr 2009 15:30:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqY3Q-0004NS-UR for qemu-devel@nongnu.org; Sun, 05 Apr 2009 15:30:53 -0400 Received: from [199.232.76.173] (port=46944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqY3Q-0004N2-GH for qemu-devel@nongnu.org; Sun, 05 Apr 2009 15:30:52 -0400 Received: from savannah.gnu.org ([199.232.41.3]:40661 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LqY3Q-0008Qp-5k for qemu-devel@nongnu.org; Sun, 05 Apr 2009 15:30:52 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LqY3P-0000nE-NY for qemu-devel@nongnu.org; Sun, 05 Apr 2009 19:30:51 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LqY3P-0000n8-Fl for qemu-devel@nongnu.org; Sun, 05 Apr 2009 19:30:51 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Sun, 05 Apr 2009 19:30:51 +0000 Subject: [Qemu-devel] [6998] create qemu_file_set_error (Glauber Costa) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6998 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6998 Author: aliguori Date: 2009-04-05 19:30:51 +0000 (Sun, 05 Apr 2009) Log Message: ----------- create qemu_file_set_error (Glauber Costa) 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 Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/hw.h trunk/savevm.c Modified: trunk/hw/hw.h =================================================================== --- trunk/hw/hw.h 2009-04-05 19:30:33 UTC (rev 6997) +++ trunk/hw/hw.h 2009-04-05 19:30:51 UTC (rev 6998) @@ -67,6 +67,7 @@ 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 Modified: trunk/savevm.c =================================================================== --- trunk/savevm.c 2009-04-05 19:30:33 UTC (rev 6997) +++ trunk/savevm.c 2009-04-05 19:30:51 UTC (rev 6998) @@ -370,6 +370,11 @@ return f->has_error; } +void qemu_file_set_error(QEMUFile *f) +{ + f->has_error = 1; +} + void qemu_fflush(QEMUFile *f) { if (!f->put_buffer)