diff mbox series

vmstate: constify SaveVMHandlers

Message ID 20181114133139.27346-1-marcandre.lureau@redhat.com
State New
Headers show
Series vmstate: constify SaveVMHandlers | expand

Commit Message

Marc-André Lureau Nov. 14, 2018, 1:31 p.m. UTC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/migration/register.h | 2 +-
 migration/savevm.c           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Dr. David Alan Gilbert Nov. 30, 2018, 8:08 p.m. UTC | #1
* Marc-André Lureau (marcandre.lureau@redhat.com) wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  include/migration/register.h | 2 +-
>  migration/savevm.c           | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/migration/register.h b/include/migration/register.h
> index d287f4c317..3d0b9833c6 100644
> --- a/include/migration/register.h
> +++ b/include/migration/register.h
> @@ -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);
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 236b242642..00a054721a 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -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;
> -- 
> 2.19.1.708.g4ede3d42df
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
Dr. David Alan Gilbert Jan. 23, 2019, 12:03 p.m. UTC | #2
* Marc-André Lureau (marcandre.lureau@redhat.com) wrote:
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Queued

> ---
>  include/migration/register.h | 2 +-
>  migration/savevm.c           | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/migration/register.h b/include/migration/register.h
> index d287f4c317..3d0b9833c6 100644
> --- a/include/migration/register.h
> +++ b/include/migration/register.h
> @@ -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);
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 236b242642..00a054721a 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -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;
> -- 
> 2.19.1.708.g4ede3d42df
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox series

Patch

diff --git a/include/migration/register.h b/include/migration/register.h
index d287f4c317..3d0b9833c6 100644
--- a/include/migration/register.h
+++ b/include/migration/register.h
@@ -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);
diff --git a/migration/savevm.c b/migration/savevm.c
index 236b242642..00a054721a 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -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;