qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PATCH 1/9] qemu-file: Make a few functions non-static
Date: Thu, 28 Nov 2013 12:01:10 -0200	[thread overview]
Message-ID: <1385647278-30043-2-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1385647278-30043-1-git-send-email-ehabkost@redhat.com>

The QEMUFile code will be moved to qemu-file.c. This will require making
the following functions non-static because they are used by the savevm.c
code:

 * qemu_peek_byte()
 * qemu_peek_buffer()
 * qemu_file_skip()
 * qemu_file_set_error()

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/migration/qemu-file.h | 4 ++++
 savevm.c                      | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h
index 0f757fb..a191fb6 100644
--- a/include/migration/qemu-file.h
+++ b/include/migration/qemu-file.h
@@ -121,8 +121,11 @@ static inline void qemu_put_ubyte(QEMUFile *f, unsigned int v)
 void qemu_put_be16(QEMUFile *f, unsigned int v);
 void qemu_put_be32(QEMUFile *f, unsigned int v);
 void qemu_put_be64(QEMUFile *f, uint64_t v);
+int qemu_peek_buffer(QEMUFile *f, uint8_t *buf, int size, size_t offset);
 int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size);
+int qemu_peek_byte(QEMUFile *f, int offset);
 int qemu_get_byte(QEMUFile *f);
+void qemu_file_skip(QEMUFile *f, int size);
 void qemu_update_position(QEMUFile *f, size_t size);
 
 static inline unsigned int qemu_get_ubyte(QEMUFile *f)
@@ -141,6 +144,7 @@ void qemu_file_reset_rate_limit(QEMUFile *f);
 void qemu_file_set_rate_limit(QEMUFile *f, int64_t new_rate);
 int64_t qemu_file_get_rate_limit(QEMUFile *f);
 int qemu_file_get_error(QEMUFile *f);
+void qemu_file_set_error(QEMUFile *f, int ret);
 void qemu_fflush(QEMUFile *f);
 
 static inline void qemu_put_be64s(QEMUFile *f, const uint64_t *pv)
diff --git a/savevm.c b/savevm.c
index 3f912dd..8da1d29 100644
--- a/savevm.c
+++ b/savevm.c
@@ -578,7 +578,7 @@ int qemu_file_get_error(QEMUFile *f)
     return f->last_error;
 }
 
-static void qemu_file_set_error(QEMUFile *f, int ret)
+void qemu_file_set_error(QEMUFile *f, int ret)
 {
     if (f->last_error == 0) {
         f->last_error = ret;
@@ -827,14 +827,14 @@ void qemu_put_byte(QEMUFile *f, int v)
     }
 }
 
-static void qemu_file_skip(QEMUFile *f, int size)
+void qemu_file_skip(QEMUFile *f, int size)
 {
     if (f->buf_index + size <= f->buf_size) {
         f->buf_index += size;
     }
 }
 
-static int qemu_peek_buffer(QEMUFile *f, uint8_t *buf, int size, size_t offset)
+int qemu_peek_buffer(QEMUFile *f, uint8_t *buf, int size, size_t offset)
 {
     int pending;
     int index;
@@ -880,7 +880,7 @@ int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size)
     return done;
 }
 
-static int qemu_peek_byte(QEMUFile *f, int offset)
+int qemu_peek_byte(QEMUFile *f, int offset)
 {
     int index = f->buf_index + offset;
 
-- 
1.8.3.1

  reply	other threads:[~2013-11-28 14:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-28 14:01 [Qemu-devel] [PATCH 0/9] vmstate code split + unit tests Eduardo Habkost
2013-11-28 14:01 ` Eduardo Habkost [this message]
2013-11-28 14:01 ` [Qemu-devel] [PATCH 2/9] migration: Move QEMU_VM_* defines to migration/migration.h Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 3/9] savevm: Convert all tabs to spaces Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 4/9] savevm.c: Coding style fixes Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 5/9] savevm.c: Coding style fix Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 6/9] vmstate: Move VMState code to vmstate.c Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 7/9] qemu-file: Move QEMUFile code to qemu-file.c Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 8/9] savevm: Small comment about why timer QEMUFile/VMState code is in savevm.c Eduardo Habkost
2013-11-28 14:13   ` Andreas Färber
2013-11-28 14:22     ` Eduardo Habkost
2013-11-29 14:26       ` [Qemu-devel] [PATCH 8/9 v2] " Eduardo Habkost
2013-11-28 14:01 ` [Qemu-devel] [PATCH 9/9] tests: Some unit tests for vmstate.c Eduardo Habkost
2013-12-05 13:16 ` [Qemu-devel] [PATCH 0/9] vmstate code split + unit tests Orit Wasserman

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=1385647278-30043-2-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --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).