diff --git a/qemu-load.c b/qemu-load.c index 7acff62..9e35866 100644 --- a/qemu-load.c +++ b/qemu-load.c @@ -243,6 +243,33 @@ ram_init_load (struct qemu_device_list *dl, &ram, section_id, instance_id); } + +#define BLK_MIG_FLAG_EOS 2 + +static uint32_t +block_load (struct qemu_device *d, FILE *fp, enum qemu_save_section sec) +{ + uint64_t header; + + header = get_be64 (fp); + assert (header == BLK_MIG_FLAG_EOS); +} + +static struct qemu_device * +block_init_load (struct qemu_device_list *dl, + uint32_t section_id, uint32_t instance_id, + uint32_t version_id, bool live, FILE *fp) +{ + static struct qemu_device_vtbl block = { + "block", + block_load, + NULL + }; + + return device_alloc (dl, sizeof (struct qemu_device), + &block, section_id, instance_id); +} + /* cpu_common loader. */ struct qemu_device_cpu_common { @@ -551,6 +578,7 @@ const struct qemu_device_loader devices_x86_64[] = { { "cpu_common", cpu_common_init_load }, { "kvm-tpr-opt", kvm_tpr_opt_init_load }, { "cpu", cpu_init_load_64 }, + { "block", block_init_load }, { "ram", ram_init_load }, { "timer", timer_init_load }, { NULL } @@ -560,6 +588,7 @@ const struct qemu_device_loader devices_x86_32[] = { { "cpu_common", cpu_common_init_load }, { "kvm-tpr-opt", kvm_tpr_opt_init_load }, { "cpu", cpu_init_load_32 }, + { "block", block_init_load }, { "ram", ram_init_load }, { "timer", timer_init_load }, { NULL }