Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
 hw/nvram/eeprom93xx.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/hw/nvram/eeprom93xx.c b/hw/nvram/eeprom93xx.c
index 73b3d248d44..de689322567 100644
--- a/hw/nvram/eeprom93xx.c
+++ b/hw/nvram/eeprom93xx.c
@@ -95,28 +95,29 @@ struct _eeprom_t {
    This is a Big hack, but it is how the old state did it.
  */
 
-static int get_uint16_from_uint8(QEMUFile *f, void *pv, size_t size,
-                                 const VMStateField *field)
+static bool get_uint16_from_uint8(QEMUFile *f, void *pv, size_t size,
+                                  const VMStateField *field, Error **errp)
 {
     uint16_t *v = pv;
     *v = qemu_get_ubyte(f);
-    return 0;
+    return true;
 }
 
-static int put_unused(QEMUFile *f, void *pv, size_t size,
-                      const VMStateField *field, JSONWriter *vmdesc)
+static bool put_unused(QEMUFile *f, void *pv, size_t size,
+                       const VMStateField *field, JSONWriter *vmdesc,
+                       Error **errp)
 {
     fprintf(stderr, "uint16_from_uint8 is used only for backwards 
compatibility.\n");
     fprintf(stderr, "Never should be used to write a new state.\n");
     exit(0);
 
-    return 0;
+    return true;
 }
 
 static const VMStateInfo vmstate_hack_uint16_from_uint8 = {
     .name = "uint16_from_uint8",
-    .get  = get_uint16_from_uint8,
-    .put  = put_unused,
+    .load = get_uint16_from_uint8,
+    .save = put_unused,
 };
 
 #define VMSTATE_UINT16_HACK_TEST(_f, _s, _t)                           \
-- 
2.43.0


Reply via email to