aboutsummaryrefslogtreecommitdiff
path: root/chardev/char.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2023-01-08 14:27:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2023-01-08 14:27:40 +0000
commit3d83b78285d6e96636130f7d449fd02e2d4deee0 (patch)
tree75883256ddfbb8e21873cb7dfa9bde142378fe5b /chardev/char.c
parent528d9f33cad5245c1099d77084c78bb2244d5143 (diff)
parentfb418b51b7b43c34873f4b9af3da7031b7452115 (diff)
downloadqemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.zip
qemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.tar.gz
qemu-3d83b78285d6e96636130f7d449fd02e2d4deee0.tar.bz2
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* Atomic memslot updates for KVM (Emanuele, David) * Always send errors to logfile when daemonized (Greg) * Add support for IDE CompactFlash card (Lubomir) * First round of build system cleanups (myself) * First round of feature removals (myself) * Reduce "qemu/accel.h" inclusion (Philippe) # gpg: Signature made Thu 05 Jan 2023 23:51:09 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (24 commits) i386: SGX: remove deprecated member of SGXInfo target/i386: Add SGX aex-notify and EDECCSSA support util: remove support -chardev tty and -chardev parport util: remove support for hex numbers with a scaling suffix KVM: remove support for kernel-irqchip=off docs: do not talk about past removal as happening in the future meson: accept relative symlinks in "meson introspect --installed" data meson: cleanup compiler detection meson: support meson 0.64 -Doptimization=plain configure: test all warnings tests/qapi-schema: remove Meson workaround meson: cleanup dummy-cpus.c rules meson: tweak hardening options for Windows configure: remove backwards-compatibility and obsolete options configure: preserve qemu-ga variables configure: cleanup $cpu tests configure: remove dead function configure: remove useless write_c_skeleton ide: Add "ide-cf" driver, a CompactFlash card ide: Add 8-bit data mode ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'chardev/char.c')
-rw-r--r--chardev/char.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/chardev/char.c b/chardev/char.c
index 4c5de16..87ab6ef 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;