chardev: use bool for fe_is_open

The function qemu_chr_fe_init already treats be->fe_open as a bool and
if it acts like a bool it should be one. While we are at it make the
variable name more descriptive and add kdoc decorations.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231211145959.93759-1-alex.bennee@linaro.org>
This commit is contained in:
Alex Bennée 2023-12-11 14:59:59 +00:00
parent 2d41bf0fe1
commit 67b5595d3b
3 changed files with 21 additions and 16 deletions

View file

@ -762,7 +762,7 @@ static int qmp_query_chardev_foreach(Object *obj, void *data)
value->label = g_strdup(chr->label);
value->filename = g_strdup(chr->filename);
value->frontend_open = chr->be && chr->be->fe_open;
value->frontend_open = chr->be && chr->be->fe_is_open;
QAPI_LIST_PREPEND(*list, value);