qemu-char: Rename register_char_driver_qapi() to register_char_driver()

Now we have removed the legacy register_char_driver() we can
rename register_char_driver_qapi() to the more obvious and
shorter name.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1409653457-27863-6-git-send-email-peter.maydell@linaro.org
This commit is contained in:
Peter Maydell 2014-09-02 11:24:17 +01:00
parent a61ae7f88c
commit e4d50d47a9
7 changed files with 35 additions and 38 deletions

View File

@ -629,7 +629,7 @@ fail_handle:
static void register_types(void)
{
register_char_driver_qapi("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL);
register_char_driver("braille", CHARDEV_BACKEND_KIND_BRAILLE, NULL);
}
type_init(register_types);

View File

@ -79,7 +79,7 @@ CharDriverState *qemu_chr_open_msmouse(void)
static void register_types(void)
{
register_char_driver_qapi("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL);
register_char_driver("msmouse", CHARDEV_BACKEND_KIND_MSMOUSE, NULL);
}
type_init(register_types);

View File

@ -125,7 +125,7 @@ CharDriverState *chr_testdev_init(void)
static void register_types(void)
{
register_char_driver_qapi("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL);
register_char_driver("testdev", CHARDEV_BACKEND_KIND_TESTDEV, NULL);
}
type_init(register_types);

View File

@ -344,7 +344,7 @@ bool chr_is_ringbuf(const CharDriverState *chr);
QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename);
void register_char_driver_qapi(const char *name, ChardevBackendKind kind,
void register_char_driver(const char *name, ChardevBackendKind kind,
void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp));
/* add an eventfd to the qemu devices that are polled */

View File

@ -3495,7 +3495,7 @@ typedef struct CharDriver {
static GSList *backends;
void register_char_driver_qapi(const char *name, ChardevBackendKind kind,
void register_char_driver(const char *name, ChardevBackendKind kind,
void (*parse)(QemuOpts *opts, ChardevBackend *backend, Error **errp))
{
CharDriver *s;
@ -4124,34 +4124,32 @@ void qmp_chardev_remove(const char *id, Error **errp)
static void register_types(void)
{
register_char_driver_qapi("null", CHARDEV_BACKEND_KIND_NULL, NULL);
register_char_driver_qapi("socket", CHARDEV_BACKEND_KIND_SOCKET,
qemu_chr_parse_socket);
register_char_driver_qapi("udp", CHARDEV_BACKEND_KIND_UDP,
qemu_chr_parse_udp);
register_char_driver_qapi("ringbuf", CHARDEV_BACKEND_KIND_RINGBUF,
qemu_chr_parse_ringbuf);
register_char_driver_qapi("file", CHARDEV_BACKEND_KIND_FILE,
qemu_chr_parse_file_out);
register_char_driver_qapi("stdio", CHARDEV_BACKEND_KIND_STDIO,
qemu_chr_parse_stdio);
register_char_driver_qapi("serial", CHARDEV_BACKEND_KIND_SERIAL,
qemu_chr_parse_serial);
register_char_driver_qapi("tty", CHARDEV_BACKEND_KIND_SERIAL,
qemu_chr_parse_serial);
register_char_driver_qapi("parallel", CHARDEV_BACKEND_KIND_PARALLEL,
qemu_chr_parse_parallel);
register_char_driver_qapi("parport", CHARDEV_BACKEND_KIND_PARALLEL,
qemu_chr_parse_parallel);
register_char_driver_qapi("pty", CHARDEV_BACKEND_KIND_PTY, NULL);
register_char_driver_qapi("console", CHARDEV_BACKEND_KIND_CONSOLE, NULL);
register_char_driver_qapi("pipe", CHARDEV_BACKEND_KIND_PIPE,
qemu_chr_parse_pipe);
register_char_driver_qapi("mux", CHARDEV_BACKEND_KIND_MUX,
qemu_chr_parse_mux);
register_char_driver("null", CHARDEV_BACKEND_KIND_NULL, NULL);
register_char_driver("socket", CHARDEV_BACKEND_KIND_SOCKET,
qemu_chr_parse_socket);
register_char_driver("udp", CHARDEV_BACKEND_KIND_UDP, qemu_chr_parse_udp);
register_char_driver("ringbuf", CHARDEV_BACKEND_KIND_RINGBUF,
qemu_chr_parse_ringbuf);
register_char_driver("file", CHARDEV_BACKEND_KIND_FILE,
qemu_chr_parse_file_out);
register_char_driver("stdio", CHARDEV_BACKEND_KIND_STDIO,
qemu_chr_parse_stdio);
register_char_driver("serial", CHARDEV_BACKEND_KIND_SERIAL,
qemu_chr_parse_serial);
register_char_driver("tty", CHARDEV_BACKEND_KIND_SERIAL,
qemu_chr_parse_serial);
register_char_driver("parallel", CHARDEV_BACKEND_KIND_PARALLEL,
qemu_chr_parse_parallel);
register_char_driver("parport", CHARDEV_BACKEND_KIND_PARALLEL,
qemu_chr_parse_parallel);
register_char_driver("pty", CHARDEV_BACKEND_KIND_PTY, NULL);
register_char_driver("console", CHARDEV_BACKEND_KIND_CONSOLE, NULL);
register_char_driver("pipe", CHARDEV_BACKEND_KIND_PIPE,
qemu_chr_parse_pipe);
register_char_driver("mux", CHARDEV_BACKEND_KIND_MUX, qemu_chr_parse_mux);
/* Bug-compatibility: */
register_char_driver_qapi("memory", CHARDEV_BACKEND_KIND_MEMORY,
qemu_chr_parse_ringbuf);
register_char_driver("memory", CHARDEV_BACKEND_KIND_MEMORY,
qemu_chr_parse_ringbuf);
/* this must be done after machine init, since we register FEs with muxes
* as part of realize functions like serial_isa_realizefn when -nographic
* is specified

View File

@ -368,10 +368,10 @@ static void qemu_chr_parse_spice_port(QemuOpts *opts, ChardevBackend *backend,
static void register_types(void)
{
register_char_driver_qapi("spicevmc", CHARDEV_BACKEND_KIND_SPICEVMC,
qemu_chr_parse_spice_vmc);
register_char_driver_qapi("spiceport", CHARDEV_BACKEND_KIND_SPICEPORT,
qemu_chr_parse_spice_port);
register_char_driver("spicevmc", CHARDEV_BACKEND_KIND_SPICEVMC,
qemu_chr_parse_spice_vmc);
register_char_driver("spiceport", CHARDEV_BACKEND_KIND_SPICEPORT,
qemu_chr_parse_spice_port);
}
type_init(register_types);

View File

@ -2035,8 +2035,7 @@ static const TypeInfo qemu_console_info = {
static void register_types(void)
{
type_register_static(&qemu_console_info);
register_char_driver_qapi("vc", CHARDEV_BACKEND_KIND_VC,
qemu_chr_parse_vc);
register_char_driver("vc", CHARDEV_BACKEND_KIND_VC, qemu_chr_parse_vc);
}
type_init(register_types);