Skip to contentSkip to conversation

vmstate: constify SaveVMHandlers

PATCH In review Marc-André Lureau 2 participants 3 messages Nov 14, 2018 – Jan 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmstate: constify SaveVMHandlers

---
 include/migration/register.h | 2 +-
 migration/savevm.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
include/migration/register.h +1 -1
index d287f4c317..3d0b9833c6 100644
@@ -72,7 +72,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque);
 
 void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);
migration/savevm.c +2 -2
index 236b242642..00a054721a 100644
@@ -303,7 +303,7 @@ typedef struct SaveStateEntry {
     int section_id;
     /* section id read from the stream */
     int load_section_id;
-    SaveVMHandlers *ops;
+    const SaveVMHandlers *ops;
     const VMStateDescription *vmsd;
     void *opaque;
     CompatEntry *compat;
@@ -614,7 +614,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque)
 {
     SaveStateEntry *se;
Signature · 1 line
2.19.1.708.g4ede3d42df
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · * Marc-André Lureau ([email protected]) wrote:
Quoted 43 lines
---
 include/migration/register.h | 2 +-
 migration/savevm.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
include/migration/register.h +1 -1
index d287f4c317..3d0b9833c6 100644
@@ -72,7 +72,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque);
 
 void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);
migration/savevm.c +2 -2
index 236b242642..00a054721a 100644
@@ -303,7 +303,7 @@ typedef struct SaveStateEntry {
     int section_id;
     /* section id read from the stream */
     int load_section_id;
-    SaveVMHandlers *ops;
+    const SaveVMHandlers *ops;
     const VMStateDescription *vmsd;
     void *opaque;
     CompatEntry *compat;
@@ -614,7 +614,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque)
 {
     SaveStateEntry *se;
Signature · 1 line
2.19.1.708.g4ede3d42df

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#2 lore raw
In reply to Marc-André Lureau
Quoted 1 line · * Marc-André Lureau ([email protected]) wrote:

Queued

Quoted 44 lines
---
 include/migration/register.h | 2 +-
 migration/savevm.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
include/migration/register.h +1 -1
index d287f4c317..3d0b9833c6 100644
@@ -72,7 +72,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque);
 
 void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);
migration/savevm.c +2 -2
index 236b242642..00a054721a 100644
@@ -303,7 +303,7 @@ typedef struct SaveStateEntry {
     int section_id;
     /* section id read from the stream */
     int load_section_id;
-    SaveVMHandlers *ops;
+    const SaveVMHandlers *ops;
     const VMStateDescription *vmsd;
     void *opaque;
     CompatEntry *compat;
@@ -614,7 +614,7 @@ int register_savevm_live(DeviceState *dev,
                          const char *idstr,
                          int instance_id,
                          int version_id,
-                         SaveVMHandlers *ops,
+                         const SaveVMHandlers *ops,
                          void *opaque)
 {
     SaveStateEntry *se;
Signature · 1 line
2.19.1.708.g4ede3d42df

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK