diff options
author | Juan Quintela <quintela@redhat.com> | 2009-09-10 03:04:22 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-09-11 10:19:50 -0500 |
commit | 1a621c8dc9e4dcc9d385bdd2c24c5b5dbfd0ebe4 (patch) | |
tree | f115b09bf49df49c251c566a2d07b43b2c9019be /vl.c | |
parent | 799f1f2325a1136a84d6f0ea94d891ef33656af2 (diff) |
ram: remove support for loading v1
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 42 |
1 files changed, 0 insertions, 42 deletions
@@ -2792,45 +2792,6 @@ void qemu_del_wait_object(HANDLE handle, WaitObjectFunc *func, void *opaque) /***********************************************************/ /* ram save/restore */ -static int ram_get_page(QEMUFile *f, uint8_t *buf, int len) -{ - int v; - - v = qemu_get_byte(f); - switch(v) { - case 0: - if (qemu_get_buffer(f, buf, len) != len) - return -EIO; - break; - case 1: - v = qemu_get_byte(f); - memset(buf, v, len); - break; - default: - return -EINVAL; - } - - if (qemu_file_has_error(f)) - return -EIO; - - return 0; -} - -static int ram_load_v1(QEMUFile *f, void *opaque) -{ - int ret; - ram_addr_t i; - - if (qemu_get_be32(f) != last_ram_offset) - return -EINVAL; - for(i = 0; i < last_ram_offset; i+= TARGET_PAGE_SIZE) { - ret = ram_get_page(f, qemu_get_ram_ptr(i), TARGET_PAGE_SIZE); - if (ret) - return ret; - } - return 0; -} - #define BDRV_HASH_BLOCK_SIZE 1024 #define IOBUF_SIZE 4096 #define RAM_CBLOCK_MAGIC 0xfabe @@ -3065,9 +3026,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) ram_addr_t addr; int flags; - if (version_id == 1) - return ram_load_v1(f, opaque); - if (version_id == 2) { if (qemu_get_be32(f) != last_ram_offset) return -EINVAL; |