[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] char: Skip CLI aliases in query-chardev-backends
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 1/2] char: Skip CLI aliases in query-chardev-backends |
Date: |
Thu, 12 Nov 2020 09:22:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Kevin Wolf <kwolf@redhat.com> writes:
> The aliases "tty" and "parport" are only valid on the command line, QMP
> commands like chardev-add don't know them. query-chardev-backends should
> describe QMP and therefore not include them in the list of available
> backends.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
I'd call that a bug.
In the light of PATCH 2, I propose to put that one first (with the
help_string_append() hunk dropped), then remove the aliases from CLI
help, too, like this:
diff --git a/chardev/char.c b/chardev/char.c
index aa4282164a..8b6e78a122 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -568,13 +568,8 @@ static void
chardev_name_foreach(void (*fn)(const char *name, void *opaque), void *opaque)
{
ChadevClassFE fe = { .fn = fn, .opaque = opaque };
- int i;
object_class_foreach(chardev_class_foreach, TYPE_CHARDEV, false, &fe);
-
- for (i = 0; i < (int)ARRAY_SIZE(chardev_alias_table); i++) {
- fn(chardev_alias_table[i].alias, opaque);
- }
}
static void