aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-25 20:24:19 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-25 20:24:19 +0000
commit2ca83a8dd63bde5f78300dc0c21159873d5aaf54 (patch)
tree0f688658292495a0834760340db7708e6f09493e /vl.c
parent59e0fbf8e916efa9b9e9fed00f5692e8a7d684d9 (diff)
Revert r5274 which breaks savevm/loadvm
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5321 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/vl.c b/vl.c
index 84f1b3c97f..4dc7351937 100644
--- a/vl.c
+++ b/vl.c
@@ -6247,9 +6247,9 @@ void qemu_fclose(QEMUFile *f)
qemu_free(f);
}
-void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, size_t size)
+void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size)
{
- size_t l;
+ int l;
while (size > 0) {
l = IO_BUF_SIZE - f->buf_index;
if (l > size)
@@ -6263,16 +6263,16 @@ void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, size_t size)
}
}
-void qemu_put_byte(QEMUFile *f, int8_t v)
+void qemu_put_byte(QEMUFile *f, int v)
{
f->buf[f->buf_index++] = v;
if (f->buf_index >= IO_BUF_SIZE)
qemu_fflush(f);
}
-size_t qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size1)
+int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size1)
{
- size_t size, l;
+ int size, l;
size = size1;
while (size > 0) {
@@ -6293,7 +6293,7 @@ size_t qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size1)
return size1 - size;
}
-int8_t qemu_get_byte(QEMUFile *f)
+int qemu_get_byte(QEMUFile *f)
{
if (f->buf_index >= f->buf_size) {
qemu_fill_buffer(f);
@@ -6329,13 +6329,13 @@ int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence)
return pos;
}
-void qemu_put_be16(QEMUFile *f, uint16_t v)
+void qemu_put_be16(QEMUFile *f, unsigned int v)
{
qemu_put_byte(f, v >> 8);
qemu_put_byte(f, v);
}
-void qemu_put_be32(QEMUFile *f, uint32_t v)
+void qemu_put_be32(QEMUFile *f, unsigned int v)
{
qemu_put_byte(f, v >> 24);
qemu_put_byte(f, v >> 16);
@@ -6349,17 +6349,17 @@ void qemu_put_be64(QEMUFile *f, uint64_t v)
qemu_put_be32(f, v);
}
-uint16_t qemu_get_be16(QEMUFile *f)
+unsigned int qemu_get_be16(QEMUFile *f)
{
- uint16_t v;
+ unsigned int v;
v = qemu_get_byte(f) << 8;
v |= qemu_get_byte(f);
return v;
}
-uint32_t qemu_get_be32(QEMUFile *f)
+unsigned int qemu_get_be32(QEMUFile *f)
{
- uint32_t v;
+ unsigned int v;
v = qemu_get_byte(f) << 24;
v |= qemu_get_byte(f) << 16;
v |= qemu_get_byte(f) << 8;