[Qemu-devel] [PATCH v2 2/6] stubs: Add stubs for ram block notifier API

Fam Zheng posted 6 patches 8 years, 11 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v2 2/6] stubs: Add stubs for ram block notifier API
Posted by Fam Zheng 8 years, 11 months ago
These two functions will be wanted by block-obj-y but the actual
definition is in obj-y which is correctly placed, so stub them to keep
the linker happy.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 stubs/Makefile.objs        |  1 +
 stubs/ram-block-notifier.c | 10 ++++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 stubs/ram-block-notifier.c

diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index aa6050f..38e3bdc 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -36,3 +36,4 @@ stub-obj-y += qmp_pc_dimm_device_list.o
 stub-obj-y += target-monitor-defs.o
 stub-obj-y += target-get-monitor-def.o
 stub-obj-y += pc_madt_cpu_entry.o
+stub-obj-y += ram-block-notifier.o
diff --git a/stubs/ram-block-notifier.c b/stubs/ram-block-notifier.c
new file mode 100644
index 0000000..ea5d528
--- /dev/null
+++ b/stubs/ram-block-notifier.c
@@ -0,0 +1,10 @@
+#include "qemu/osdep.h"
+#include "exec/ramlist.h"
+
+void ram_block_notifier_add(RAMBlockNotifier *n)
+{
+}
+
+void ram_block_notifier_remove(RAMBlockNotifier *n)
+{
+}
-- 
2.9.3


Re: [Qemu-devel] [PATCH v2 2/6] stubs: Add stubs for ram block notifier API
Posted by Paolo Bonzini 8 years, 11 months ago

On 23/02/2017 10:18, Fam Zheng wrote:
> These two functions will be wanted by block-obj-y but the actual
> definition is in obj-y which is correctly placed, so stub them to keep
> the linker happy.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  stubs/Makefile.objs        |  1 +
>  stubs/ram-block-notifier.c | 10 ++++++++++
>  2 files changed, 11 insertions(+)
>  create mode 100644 stubs/ram-block-notifier.c
> 
> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
> index aa6050f..38e3bdc 100644
> --- a/stubs/Makefile.objs
> +++ b/stubs/Makefile.objs
> @@ -36,3 +36,4 @@ stub-obj-y += qmp_pc_dimm_device_list.o
>  stub-obj-y += target-monitor-defs.o
>  stub-obj-y += target-get-monitor-def.o
>  stub-obj-y += pc_madt_cpu_entry.o
> +stub-obj-y += ram-block-notifier.o
> diff --git a/stubs/ram-block-notifier.c b/stubs/ram-block-notifier.c
> new file mode 100644
> index 0000000..ea5d528
> --- /dev/null
> +++ b/stubs/ram-block-notifier.c
> @@ -0,0 +1,10 @@
> +#include "qemu/osdep.h"
> +#include "exec/ramlist.h"
> +
> +void ram_block_notifier_add(RAMBlockNotifier *n)
> +{
> +}
> +
> +void ram_block_notifier_remove(RAMBlockNotifier *n)
> +{
> +}
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>