From 1a621c8dc9e4dcc9d385bdd2c24c5b5dbfd0ebe4 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Thu, 10 Sep 2009 03:04:22 +0200 Subject: ram: remove support for loading v1 Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- vl.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 0446769..0787cf0 100644 --- a/vl.c +++ b/vl.c @@ -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; -- cgit v1.1