[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] savevm: use seekeble file to savevm
From: |
Wenchao Xia |
Subject: |
[Qemu-devel] [PATCH 4/4] savevm: use seekeble file to savevm |
Date: |
Thu, 28 Feb 2013 16:09:45 +0800 |
This patch can verify that it is compatiable with old stream
snapshot format.
Signed-off-by: Wenchao Xia <address@hidden>
---
savevm.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/savevm.c b/savevm.c
index 57dbf09..8ab0a3d 100644
--- a/savevm.c
+++ b/savevm.c
@@ -425,8 +425,11 @@ static const QEMUFileOps bdrv_write_ops = {
static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable)
{
- if (is_writable)
- return qemu_fopen_ops(bs, &bdrv_write_ops);
+ if (is_writable) {
+ QEMUFile *qf = qemu_fopen_ops(bs, &bdrv_write_ops);
+ qf->file_seekable = true;
+ return qf;
+ }
return qemu_fopen_ops(bs, &bdrv_read_ops);
}
--
1.7.1