[PATCH] Fix build with new yank feature by adding stubs

Lukas Straub posted 1 patch 4 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210114141918.5201cc9c@gecko.fritz.box
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
stubs/meson.build |  1 +
stubs/yank.c      | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
create mode 100644 stubs/yank.c
[PATCH] Fix build with new yank feature by adding stubs
Posted by Lukas Straub 4 years, 10 months ago
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
 stubs/meson.build |  1 +
 stubs/yank.c      | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 stubs/yank.c

diff --git a/stubs/meson.build b/stubs/meson.build
index 80b1d81a31..1a656cd070 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c'))
 stub_ss.add(files('win32-kbd-hook.c'))
 stub_ss.add(files('cpu-synchronize-state.c'))
 if have_block
+  stub_ss.add(files('yank.c'))
   stub_ss.add(files('replay-tools.c'))
 endif
 if have_system
diff --git a/stubs/yank.c b/stubs/yank.c
new file mode 100644
index 0000000000..6090416065
--- /dev/null
+++ b/stubs/yank.c
@@ -0,0 +1,29 @@
+#include "qemu/osdep.h"
+#include "qemu/yank.h"
+
+bool yank_register_instance(const YankInstance *instance, Error **errp)
+{
+    return true;
+}
+
+void yank_unregister_instance(const YankInstance *instance)
+{
+}
+
+void yank_register_function(const YankInstance *instance,
+                            YankFn *func,
+                            void *opaque)
+{
+}
+
+void yank_unregister_function(const YankInstance *instance,
+                              YankFn *func,
+                              void *opaque)
+{
+}
+
+void yank_generic_iochannel(void *opaque)
+{
+}
+
+
-- 
2.29.2
Re: [PATCH] Fix build with new yank feature by adding stubs
Posted by Alex Bennée 4 years, 10 months ago
Lukas Straub <lukasstraub2@web.de> writes:

> Signed-off-by: Lukas Straub <lukasstraub2@web.de>

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


I'm also going to pull this into my testing/next as I need the fix as a
prerequisite.

> ---
>  stubs/meson.build |  1 +
>  stubs/yank.c      | 29 +++++++++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 stubs/yank.c
>
> diff --git a/stubs/meson.build b/stubs/meson.build
> index 80b1d81a31..1a656cd070 100644
> --- a/stubs/meson.build
> +++ b/stubs/meson.build
> @@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c'))
>  stub_ss.add(files('win32-kbd-hook.c'))
>  stub_ss.add(files('cpu-synchronize-state.c'))
>  if have_block
> +  stub_ss.add(files('yank.c'))
>    stub_ss.add(files('replay-tools.c'))
>  endif
>  if have_system
> diff --git a/stubs/yank.c b/stubs/yank.c
> new file mode 100644
> index 0000000000..6090416065
> --- /dev/null
> +++ b/stubs/yank.c
> @@ -0,0 +1,29 @@
> +#include "qemu/osdep.h"
> +#include "qemu/yank.h"
> +
> +bool yank_register_instance(const YankInstance *instance, Error **errp)
> +{
> +    return true;
> +}
> +
> +void yank_unregister_instance(const YankInstance *instance)
> +{
> +}
> +
> +void yank_register_function(const YankInstance *instance,
> +                            YankFn *func,
> +                            void *opaque)
> +{
> +}
> +
> +void yank_unregister_function(const YankInstance *instance,
> +                              YankFn *func,
> +                              void *opaque)
> +{
> +}
> +
> +void yank_generic_iochannel(void *opaque)
> +{
> +}
> +
> +


-- 
Alex Bennée

Re: [PATCH] Fix build with new yank feature by adding stubs
Posted by Philippe Mathieu-Daudé 4 years, 10 months ago
On 1/14/21 2:19 PM, Lukas Straub wrote:

Fixes: 50186051f42 ("Introduce yank feature")

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
> ---
>  stubs/meson.build |  1 +
>  stubs/yank.c      | 29 +++++++++++++++++++++++++++++
>  2 files changed, 30 insertions(+)
>  create mode 100644 stubs/yank.c