aboutsummaryrefslogtreecommitdiff
path: root/chardev
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-12-16 10:56:53 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2023-01-06 00:51:02 +0100
commit6f9f630836df355b9ca3f4641e6b7be71f6af076 (patch)
tree1f0c2b971a37007b7858d8afd3abdc486e6450e3 /chardev
parent8b902e3d2309595567e4957b96e971c4f3ca455e (diff)
util: remove support -chardev tty and -chardev parport
These were deprecated in 6.0 and can now be removed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'chardev')
-rw-r--r--chardev/char.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/chardev/char.c b/chardev/char.c
index 4c5de16402..87ab6efbcc 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -530,19 +530,6 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)
return cc;
}
-static struct ChardevAlias {
- const char *typename;
- const char *alias;
- bool deprecation_warning_printed;
-} chardev_alias_table[] = {
-#ifdef HAVE_CHARDEV_PARPORT
- { "parallel", "parport" },
-#endif
-#ifdef HAVE_CHARDEV_SERIAL
- { "serial", "tty" },
-#endif
-};
-
typedef struct ChadevClassFE {
void (*fn)(const char *name, void *opaque);
void *opaque;
@@ -578,28 +565,12 @@ help_string_append(const char *name, void *opaque)
g_string_append_printf(str, "\n %s", name);
}
-static const char *chardev_alias_translate(const char *name)
-{
- int i;
- for (i = 0; i < (int)ARRAY_SIZE(chardev_alias_table); i++) {
- if (g_strcmp0(chardev_alias_table[i].alias, name) == 0) {
- if (!chardev_alias_table[i].deprecation_warning_printed) {
- warn_report("The alias '%s' is deprecated, use '%s' instead",
- name, chardev_alias_table[i].typename);
- chardev_alias_table[i].deprecation_warning_printed = true;
- }
- return chardev_alias_table[i].typename;
- }
- }
- return name;
-}
-
ChardevBackend *qemu_chr_parse_opts(QemuOpts *opts, Error **errp)
{
Error *local_err = NULL;
const ChardevClass *cc;
ChardevBackend *backend = NULL;
- const char *name = chardev_alias_translate(qemu_opt_get(opts, "backend"));
+ const char *name = qemu_opt_get(opts, "backend");
if (name == NULL) {
error_setg(errp, "chardev: \"%s\" missing backend",
@@ -637,7 +608,7 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
const ChardevClass *cc;
Chardev *chr = NULL;
ChardevBackend *backend = NULL;
- const char *name = chardev_alias_translate(qemu_opt_get(opts, "backend"));
+ const char *name = qemu_opt_get(opts, "backend");
const char *id = qemu_opts_id(opts);
char *bid = NULL;