[RFC 10/22] hw/pci/msix.c: use new migration APIs

Vladimir Sementsov-Ogievskiy posted 22 patches 2 weeks, 2 days ago
[RFC 10/22] hw/pci/msix.c: use new migration APIs
Posted by Vladimir Sementsov-Ogievskiy 2 weeks, 2 days ago
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
 hw/pci/msix.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 8c7f6709e2..b915edf35c 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -679,25 +679,26 @@ void msix_unset_vector_notifiers(PCIDevice *dev)
     dev->msix_vector_poll_notifier = NULL;
 }
 
-static int put_msix_state(QEMUFile *f, void *pv, size_t size,
-                          const VMStateField *field, JSONWriter *vmdesc)
+static bool put_msix_state(QEMUFile *f, void *pv, size_t size,
+                           const VMStateField *field, JSONWriter *vmdesc,
+                           Error **errp)
 {
     msix_save(pv, f);
 
-    return 0;
+    return true;
 }
 
-static int get_msix_state(QEMUFile *f, void *pv, size_t size,
-                          const VMStateField *field)
+static bool get_msix_state(QEMUFile *f, void *pv, size_t size,
+                           const VMStateField *field, Error **errp)
 {
     msix_load(pv, f);
-    return 0;
+    return true;
 }
 
 static const VMStateInfo vmstate_info_msix = {
     .name = "msix state",
-    .get  = get_msix_state,
-    .put  = put_msix_state,
+    .load = get_msix_state,
+    .save = put_msix_state,
 };
 
 const VMStateDescription vmstate_msix = {
-- 
2.48.1