diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2022-06-20 12:02:05 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-06-23 10:18:13 +0100 |
commit | 77ef2dc1c8c6a482fd06fdf3b59d0647f0850e3e (patch) | |
tree | d2080d38851cdaebb0b2c6f1c3dd08e9b0c7dff5 /migration/savevm.c | |
parent | 02bdbe172da51ae2189d8c6035c3aeb3788b553f (diff) |
migration: remove the QEMUFileOps abstraction
Now that all QEMUFile callbacks are removed, the entire concept can be
deleted.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/savevm.c')
-rw-r--r-- | migration/savevm.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index 3e9612121a..e8a1b96fcd 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -37,7 +37,6 @@ #include "migration/global_state.h" #include "migration/channel-block.h" #include "ram.h" -#include "qemu-file-channel.h" #include "qemu-file.h" #include "savevm.h" #include "postcopy-ram.h" @@ -134,11 +133,9 @@ static struct mig_cmd_args { static QEMUFile *qemu_fopen_bdrv(BlockDriverState *bs, int is_writable) { if (is_writable) { - return qemu_fopen_channel_output( - QIO_CHANNEL(qio_channel_block_new(bs))); + return qemu_file_new_output(QIO_CHANNEL(qio_channel_block_new(bs))); } else { - return qemu_fopen_channel_input( - QIO_CHANNEL(qio_channel_block_new(bs))); + return qemu_file_new_input(QIO_CHANNEL(qio_channel_block_new(bs))); } } @@ -2161,7 +2158,7 @@ static int loadvm_handle_cmd_packaged(MigrationIncomingState *mis) bioc->usage += length; trace_loadvm_handle_cmd_packaged_received(ret); - QEMUFile *packf = qemu_fopen_channel_input(QIO_CHANNEL(bioc)); + QEMUFile *packf = qemu_file_new_input(QIO_CHANNEL(bioc)); ret = qemu_loadvm_state_main(packf, mis); trace_loadvm_handle_cmd_packaged_main(ret); @@ -2919,7 +2916,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, goto the_end; } qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-save-state"); - f = qemu_fopen_channel_output(QIO_CHANNEL(ioc)); + f = qemu_file_new_output(QIO_CHANNEL(ioc)); object_unref(OBJECT(ioc)); ret = qemu_save_device_state(f); if (ret < 0 || qemu_fclose(f) < 0) { @@ -2966,7 +2963,7 @@ void qmp_xen_load_devices_state(const char *filename, Error **errp) return; } qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-load-state"); - f = qemu_fopen_channel_input(QIO_CHANNEL(ioc)); + f = qemu_file_new_input(QIO_CHANNEL(ioc)); object_unref(OBJECT(ioc)); ret = qemu_loadvm_state(f); |