[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler
From: |
Cédric Le Goater |
Subject: |
[PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler typedefs |
Date: |
Wed, 6 Mar 2024 14:34:17 +0100 |
They are only used once.
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
include/migration/register.h | 4 ++--
include/qemu/typedefs.h | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/migration/register.h b/include/migration/register.h
index
9ab1f79512c605f0c88a45b560c57486fa054441..2e6a7d766e62f64940086b7b511249c9ff21fa62
100644
--- a/include/migration/register.h
+++ b/include/migration/register.h
@@ -18,7 +18,7 @@
typedef struct SaveVMHandlers {
/* This runs inside the BQL. */
- SaveStateHandler *save_state;
+ void (*save_state)(QEMUFile *f, void *opaque);
/*
* save_prepare is called early, even before migration starts, and can be
@@ -71,7 +71,7 @@ typedef struct SaveVMHandlers {
/* This calculate the exact remaining data to transfer */
void (*state_pending_exact)(void *opaque, uint64_t *must_precopy,
uint64_t *can_postcopy);
- LoadStateHandler *load_state;
+ int (*load_state)(QEMUFile *f, void *opaque, int version_id);
int (*load_setup)(QEMUFile *f, void *opaque);
int (*load_cleanup)(void *opaque);
/* Called when postcopy migration wants to resume from failure */
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index
a028dba4d0b67e87165f9f1a4e960e9e6b94477c..50c277cf0b467f782ba526041b2663207bf70945
100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -151,8 +151,6 @@ typedef struct IRQState *qemu_irq;
/*
* Function types
*/
-typedef void SaveStateHandler(QEMUFile *f, void *opaque);
-typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
typedef void (*qemu_irq_handler)(void *opaque, int n, int level);
#endif /* QEMU_TYPEDEFS_H */
--
2.44.0
- [PATCH v4 00/25] migration: Improve error reporting, Cédric Le Goater, 2024/03/06
- [PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler typedefs,
Cédric Le Goater <=
- [PATCH v4 01/25] migration: Report error when shutdown fails, Cédric Le Goater, 2024/03/06
- [PATCH v4 03/25] migration: Add documentation for SaveVMHandlers, Cédric Le Goater, 2024/03/06
- [PATCH v4 04/25] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error, Cédric Le Goater, 2024/03/06
- [PATCH v4 05/25] s390/stattrib: Add Error** argument to set_migrationmode() handler, Cédric Le Goater, 2024/03/06
- [PATCH v4 07/25] migration: Always report an error in block_save_setup(), Cédric Le Goater, 2024/03/06