Patchwork [01/17] libqemustub: Add qemu_[un]register_reset() stubs

login
register
mail settings
Submitter Andreas Färber
Date Jan. 8, 2013, 8:56 p.m.
Message ID <1357678594-427-2-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/210506/
State New
Headers show

Comments

Andreas Färber - Jan. 8, 2013, 8:56 p.m.
From: Eduardo Habkost <ehabkost@redhat.com>

This will be useful for code that don't call qemu_devices_reset() (e.g.
*-user). If qemu_devices_reset() is never called, it means we don't need
to keep track of the reset handler list.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 stubs/Makefile.objs |    1 +
 stubs/reset.c       |   13 +++++++++++++
 2 Dateien geändert, 14 Zeilen hinzugefügt(+)
 create mode 100644 stubs/reset.c

Patch

diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 035b29a..00f0b64 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -5,4 +5,5 @@  stub-obj-y += fdset-get-fd.o
 stub-obj-y += fdset-remove-fd.o
 stub-obj-y += get-fd.o
 stub-obj-y += set-fd-handler.o
+stub-obj-y += reset.o
 stub-obj-$(CONFIG_WIN32) += fd-register.o
diff --git a/stubs/reset.c b/stubs/reset.c
new file mode 100644
index 0000000..ad28725
--- /dev/null
+++ b/stubs/reset.c
@@ -0,0 +1,13 @@ 
+#include "hw/hw.h"
+
+/* Stub functions for binaries that never call qemu_devices_reset(),
+ * and don't need to keep track of the reset handler list.
+ */
+
+void qemu_register_reset(QEMUResetHandler *func, void *opaque)
+{
+}
+
+void qemu_unregister_reset(QEMUResetHandler *func, void *opaque)
+{
+}