From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeJtn-0006l3-US for qemu-devel@nongnu.org; Wed, 15 Oct 2014 04:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeJth-0002CA-Ns for qemu-devel@nongnu.org; Wed, 15 Oct 2014 04:25:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeJth-0002C5-6g for qemu-devel@nongnu.org; Wed, 15 Oct 2014 04:25:29 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9F8PR83008856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 15 Oct 2014 04:25:28 -0400 From: Juan Quintela Date: Wed, 15 Oct 2014 10:25:00 +0200 Message-Id: <1413361504-26396-7-git-send-email-quintela@redhat.com> In-Reply-To: <1413361504-26396-1-git-send-email-quintela@redhat.com> References: <1413361504-26396-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PULL 06/10] qemu-file: Make qemu_file_is_writable() non-static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost From: Eduardo Habkost The QEMUFileStdio code will use qemu_file_is_writable() and will be moved to a separate file. Signed-off-by: Eduardo Habkost Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela --- include/migration/qemu-file.h | 1 + qemu-file.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h index 70ff347..401676b 100644 --- a/include/migration/qemu-file.h +++ b/include/migration/qemu-file.h @@ -120,6 +120,7 @@ void qemu_put_byte(QEMUFile *f, int v); */ void qemu_put_buffer_async(QEMUFile *f, const uint8_t *buf, int size); bool qemu_file_mode_is_not_valid(const char *mode); +bool qemu_file_is_writable(QEMUFile *f); QEMUSizedBuffer *qsb_create(const uint8_t *buffer, size_t len); QEMUSizedBuffer *qsb_clone(const QEMUSizedBuffer *); diff --git a/qemu-file.c b/qemu-file.c index a5bbe7e..c303b61 100644 --- a/qemu-file.c +++ b/qemu-file.c @@ -456,7 +456,7 @@ void qemu_file_set_error(QEMUFile *f, int ret) } } -static inline bool qemu_file_is_writable(QEMUFile *f) +bool qemu_file_is_writable(QEMUFile *f) { return f->ops->writev_buffer || f->ops->put_buffer; } -- 2.1.0