Patchwork [qom-cpu,v3,2/6] stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY

login
register
mail settings
Submitter Andreas Färber
Date Feb. 25, 2013, 6:22 p.m.
Message ID <1361816570-8707-3-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/222998/
State New
Headers show

Comments

Andreas Färber - Feb. 25, 2013, 6:22 p.m.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/migration/vmstate.h |    4 ++++
 stubs/vmstate.c             |    2 ++
 2 Dateien geändert, 6 Zeilen hinzugefügt(+)
Eduardo Habkost - Feb. 26, 2013, 7:24 p.m.
On Mon, Feb 25, 2013 at 07:22:46PM +0100, Andreas Färber wrote:
> Reviewed-by: Juan Quintela <quintela@redhat.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>

> ---
>  include/migration/vmstate.h |    4 ++++
>  stubs/vmstate.c             |    2 ++
>  2 Dateien geändert, 6 Zeilen hinzugefügt(+)
> 
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index 6d50f6e..214a8e9 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -119,6 +119,10 @@ struct VMStateDescription {
>      const VMStateSubsection *subsections;
>  };
>  
> +#ifdef CONFIG_USER_ONLY
> +extern const VMStateDescription vmstate_dummy;
> +#endif
> +
>  extern const VMStateInfo vmstate_info_bool;
>  
>  extern const VMStateInfo vmstate_info_int8;
> diff --git a/stubs/vmstate.c b/stubs/vmstate.c
> index 3682af5..778bc3f 100644
> --- a/stubs/vmstate.c
> +++ b/stubs/vmstate.c
> @@ -1,6 +1,8 @@
>  #include "qemu-common.h"
>  #include "migration/vmstate.h"
>  
> +const VMStateDescription vmstate_dummy = {};
> +
>  int vmstate_register_with_alias_id(DeviceState *dev,
>                                     int instance_id,
>                                     const VMStateDescription *vmsd,
> -- 
> 1.7.10.4
>

Patch

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 6d50f6e..214a8e9 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -119,6 +119,10 @@  struct VMStateDescription {
     const VMStateSubsection *subsections;
 };
 
+#ifdef CONFIG_USER_ONLY
+extern const VMStateDescription vmstate_dummy;
+#endif
+
 extern const VMStateInfo vmstate_info_bool;
 
 extern const VMStateInfo vmstate_info_int8;
diff --git a/stubs/vmstate.c b/stubs/vmstate.c
index 3682af5..778bc3f 100644
--- a/stubs/vmstate.c
+++ b/stubs/vmstate.c
@@ -1,6 +1,8 @@ 
 #include "qemu-common.h"
 #include "migration/vmstate.h"
 
+const VMStateDescription vmstate_dummy = {};
+
 int vmstate_register_with_alias_id(DeviceState *dev,
                                    int instance_id,
                                    const VMStateDescription *vmsd,