[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/19] qemu-char: move baum registration to baum.c
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 15/19] qemu-char: move baum registration to baum.c |
Date: |
Mon, 18 Feb 2013 15:48:12 -0600 |
Signed-off-by: Anthony Liguori <address@hidden>
---
hw/baum.c | 9 ++++++++-
hw/baum.h | 30 ------------------------------
qemu-char.c | 4 ----
vl.c | 1 -
4 files changed, 8 insertions(+), 36 deletions(-)
delete mode 100644 hw/baum.h
diff --git a/hw/baum.c b/hw/baum.c
index 09dcb9c..d75b150 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -562,7 +562,7 @@ static void baum_close(struct CharDriverState *chr)
g_free(baum);
}
-CharDriverState *chr_baum_init(QemuOpts *opts)
+static CharDriverState *chr_baum_init(QemuOpts *opts)
{
BaumDriverState *baum;
CharDriverState *chr;
@@ -625,3 +625,10 @@ fail_handle:
g_free(baum);
return NULL;
}
+
+static void register_types(void)
+{
+ register_char_driver("braille", chr_baum_init);
+}
+
+type_init(register_types);
diff --git a/hw/baum.h b/hw/baum.h
deleted file mode 100644
index 7635884..0000000
--- a/hw/baum.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * QEMU Baum
- *
- * Copyright (c) 2008 Samuel Thibault
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#ifndef HW_BAUM_H
-#define HW_BAUM_H 1
-
-/* char device */
-CharDriverState *chr_baum_init(QemuOpts *opts);
-
-#endif
diff --git a/qemu-char.c b/qemu-char.c
index 8b4c9a5..14b0111 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -28,7 +28,6 @@
#include "qemu/timer.h"
#include "char/char.h"
#include "hw/usb.h"
-#include "hw/baum.h"
#include "hw/msmouse.h"
#include "qmp-commands.h"
@@ -3669,9 +3668,6 @@ static void register_types(void)
register_char_driver("pty", qemu_chr_open_pty);
register_char_driver("stdio", qemu_chr_open_stdio);
#endif
-#ifdef CONFIG_BRLAPI
- register_char_driver("braille", chr_baum_init);
-#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
|| defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
|| defined(__FreeBSD_kernel__)
diff --git a/vl.c b/vl.c
index c5b0eea..bae494c 100644
--- a/vl.c
+++ b/vl.c
@@ -119,7 +119,6 @@ int main(int argc, char **argv)
#include "hw/pcmcia.h"
#include "hw/pc.h"
#include "hw/isa.h"
-#include "hw/baum.h"
#include "hw/bt.h"
#include "hw/watchdog.h"
#include "hw/smbios.h"
--
1.8.0
- [Qemu-devel] [PATCH 10/19] char: add gio watch fn for tcp backends, (continued)
- [Qemu-devel] [PATCH 11/19] qemu-char: use a glib timeout instead of qemu-timer, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 12/19] qemu-char: remove use of QEMUTimer in favor of glib idle function, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 13/19] qemu-char: make char drivers dynamically registerable, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 14/19] qemu-char: move spice registration to spice-qemu-char.c, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 19/19] virtio: console: add flow control, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 18/19] serial: add flow control to transmit, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 15/19] qemu-char: move baum registration to baum.c,
Anthony Liguori <=
- [Qemu-devel] [PATCH 16/19] qemu-char: move msmouse registeration to msmouse.c, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 17/19] qemu-char: move text console init to console.c, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 02/19] qemu-char: remove dead/confusing logic with nb_stdio_clients, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 04/19] qemu-char: convert fd_chr to use a GIOChannel, Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 05/19] qemu-char: convert pty to GIOChannel, Anthony Liguori, 2013/02/19
- Re: [Qemu-devel] [PATCH 00/19] chardev flow control, Amit Shah, 2013/02/19
- Re: [Qemu-devel] [PATCH 00/19] chardev flow control, Hans de Goede, 2013/02/19
- [Qemu-devel] [PATCH 03/19] char: add IOWatchPoll support, Anthony Liguori, 2013/02/19
- [Qemu-devel] [PATCH 01/19] char-socket: fix error reporting, Anthony Liguori, 2013/02/19